Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
f455c166
Commit
f455c166
authored
Nov 20, 2020
by
Andrzej Dabrowski
Committed by
Mark Nauwelaerts
Nov 23, 2020
Browse files
Move lspclient toggle actions to a submenu
parent
fd31edc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientpluginview.cpp
View file @
f455c166
...
...
@@ -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
);
...
...
addons/lspclient/ui.rc
View file @
f455c166
...
...
@@ -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"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment