Commit 399e8b0f authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

lspclient: re-align plugin menu with popup-menu

parent a839e6ab
......@@ -389,23 +389,6 @@ 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);
......@@ -417,25 +400,29 @@ public:
menu->addAction(m_triggerFormat);
menu->addAction(m_triggerRename);
menu->addSeparator();
menu->addAction(m_complDocOn);
menu->addAction(m_refDeclaration);
menu->addAction(m_autoHover);
menu->addAction(m_onTypeFormatting);
menu->addAction(m_incrementalSync);
menu->addSeparator();
menu->addAction(m_diagnostics);
menu->addAction(m_diagnosticsHighlight);
menu->addAction(m_diagnosticsMark);
menu->addAction(m_diagnosticsHover);
menu->addAction(m_diagnosticsSwitch);
menu->addSeparator();
menu->addAction(m_messages);
menu->addAction(m_messagesAutoSwitch);
menu->addAction(m_messagesSwitch);
menu->addSeparator();
menu->addAction(m_closeDynamic);
menu->addSeparator();
menu->addAction(m_restartServer);
menu->addAction(m_restartAll);
menu->addSeparator();
// more options
auto moreOptions = new KActionMenu(i18n("More options"), this);
menu->addAction(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);
// sync with plugin settings if updated
connect(m_plugin, &LSPClientPlugin::update, this, &self_type::configUpdated);
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="lspclient" library="lspclient" version="8" translationDomain="lspclient">
<gui name="lspclient" library="lspclient" version="9" translationDomain="lspclient">
<MenuBar>
<Menu name="LSPClient Menubar">
<text>LSP Client</text>
......@@ -19,7 +19,24 @@
<Action name="lspclient_restart_server"/>
<Action name="lspclient_restart_all"/>
<Separator/>
<Action name="lspclient_more_options"/>
<Menu name="lspclient_more_options" noMerge="1">
<text>More Options</text>
<DefineGroup name="lspclient_more_options"/>
<Action name="lspclient_completion_doc"/>
<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"/>
<Separator/>
<Action name="lspclient_messages"/>
<Action name="lspclient_messages_auto_switch"/>
</Menu>
</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