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

Temporarily restore previously removed actions and rename hover -> symbol info

parent 1fa6d19a
......@@ -209,7 +209,7 @@ class LSPClientActionView : public QObject
QPointer<QAction> m_findDecl;
QPointer<QAction> m_findRef;
QPointer<QAction> m_triggerHighlight;
QPointer<QAction> m_triggerHover;
QPointer<QAction> m_triggerSymbolInfo;
QPointer<QAction> m_triggerFormat;
QPointer<QAction> m_triggerRename;
QPointer<QAction> m_complDocOn;
......@@ -330,10 +330,8 @@ public:
m_findRef->setText(i18n("Find References"));
m_triggerHighlight = actionCollection()->addAction(QStringLiteral("lspclient_highlight"), this, &self_type::highlight);
m_triggerHighlight->setText(i18n("Highlight"));
// perhaps hover suggests to do so on mouse-over,
// but let's just use a (convenient) action/shortcut for it
m_triggerHover = actionCollection()->addAction(QStringLiteral("lspclient_hover"), this, &self_type::hover);
m_triggerHover->setText(i18n("Hover"));
m_triggerSymbolInfo = actionCollection()->addAction(QStringLiteral("lspclient_symbol_info"), this, &self_type::symbolInfo);
m_triggerSymbolInfo->setText(i18n("Symbol info"));
m_triggerFormat = actionCollection()->addAction(QStringLiteral("lspclient_format"), this, &self_type::format);
m_triggerFormat->setText(i18n("Format"));
m_triggerRename = actionCollection()->addAction(QStringLiteral("lspclient_rename"), this, &self_type::rename);
......@@ -398,7 +396,7 @@ public:
menu->addAction(m_findDecl);
menu->addAction(m_findRef);
menu->addAction(m_triggerHighlight);
menu->addAction(m_triggerHover);
menu->addAction(m_triggerSymbolInfo);
menu->addAction(m_triggerFormat);
menu->addAction(m_triggerRename);
menu->addSeparator();
......@@ -1244,7 +1242,7 @@ public:
processLocations<LSPDocumentHighlight, false>(title, &LSPClientServer::documentHighlight, true, converter);
}
void hover()
void symbolInfo()
{
// trigger manually the normally automagic hover
if (auto activeView = m_mainWindow->activeView()) {
......@@ -1903,8 +1901,8 @@ public:
m_findRef->setEnabled(refEnabled);
if (m_triggerHighlight)
m_triggerHighlight->setEnabled(highlightEnabled);
if (m_triggerHover)
m_triggerHover->setEnabled(hoverEnabled);
if (m_triggerSymbolInfo)
m_triggerSymbolInfo->setEnabled(hoverEnabled);
if (m_triggerFormat)
m_triggerFormat->setEnabled(formatEnabled);
if (m_triggerRename)
......
......@@ -8,10 +8,24 @@
<Action name="lspclient_find_declaration"/>
<Action name="lspclient_find_references"/>
<Action name="lspclient_highlight"/>
<Action name="lspclient_symbol_info"/>
<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"/>
......
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