Commit f455c166 authored by Andrzej Dabrowski's avatar Andrzej Dabrowski Committed by Mark Nauwelaerts
Browse files

Move lspclient toggle actions to a submenu

parent fd31edc1
......@@ -228,6 +228,7 @@ class LSPClientActionView : public QObject
QPointer<QAction> m_closeDynamic;
QPointer<QAction> m_restartServer;
QPointer<QAction> m_restartAll;
QPointer<KSelectAction> m_moreOptions;
// toolview
QScopedPointer<QWidget> m_toolView;
......@@ -389,6 +390,23 @@ public:
m_restartAll = actionCollection()->addAction(QStringLiteral("lspclient_restart_all"), this, &self_type::restartAll);
m_restartAll->setText(i18n("Restart All LSP Servers"));
// more options
auto moreOptions = new KActionMenu(i18n("More options"), this);
actionCollection()->addAction(QStringLiteral("lspclient_more_options"), moreOptions);
moreOptions->addAction(m_complDocOn);
moreOptions->addAction(m_refDeclaration);
moreOptions->addAction(m_autoHover);
moreOptions->addAction(m_onTypeFormatting);
moreOptions->addAction(m_incrementalSync);
moreOptions->addSeparator();
moreOptions->addAction(m_diagnostics);
moreOptions->addAction(m_diagnosticsHighlight);
moreOptions->addAction(m_diagnosticsMark);
moreOptions->addAction(m_diagnosticsHover);
moreOptions->addSeparator();
moreOptions->addAction(m_messages);
moreOptions->addAction(m_messagesAutoSwitch);
// popup menu
auto menu = new KActionMenu(i18n("LSP Client"), this);
actionCollection()->addAction(QStringLiteral("popup_lspclient"), menu);
......
......@@ -12,25 +12,14 @@
<Action name="lspclient_format"/>
<Action name="lspclient_rename"/>
<Separator/>
<Action name="lspclient_completion_doc"/>
<Action name="lspclient_references_declaration"/>
<Action name="lspclient_auto_hover"/>
<Action name="lspclient_type_formatting"/>
<Action name="lspclient_incremental_sync"/>
<Separator/>
<Action name="lspclient_diagnostics"/>
<Action name="lspclient_diagnostics_highlight"/>
<Action name="lspclient_diagnostics_mark"/>
<Action name="lspclient_diagnostics_hover"/>
<Action name="lspclient_diagnostic_switch"/>
<Separator/>
<Action name="lspclient_messages"/>
<Action name="lspclient_messages_auto_switch"/>
<Action name="lspclient_messages_switch"/>
<Separator/>
<Action name="lspclient_close_dynamic"/>
<Separator/>
<Action name="lspclient_restart_server"/>
<Action name="lspclient_restart_all"/>
<Separator/>
<Action name="lspclient_more_options"/>
</Menu>
</MenuBar>
<Menu name="ktexteditor_popup" noMerge="1">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment