LSP: Support remote LSP file paths

Change-Id: If3cf1b8d675ef091427dbcd703c7d14b384a1b3a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2022-12-15 07:23:55 +01:00
parent 0b33a08af1
commit 2d0456f085
36 changed files with 424 additions and 310 deletions

View File

@@ -195,14 +195,14 @@ LanguageClientOutlineWidget::LanguageClientOutlineWidget(Client *client,
: m_client(client)
, m_editor(editor)
, m_view(this)
, m_uri(DocumentUri::fromFilePath(editor->textDocument()->filePath()))
, m_uri(m_client->hostPathToServerUri(editor->textDocument()->filePath()))
{
connect(client->documentSymbolCache(),
&DocumentSymbolCache::gotSymbols,
this,
&LanguageClientOutlineWidget::handleResponse);
connect(client, &Client::documentUpdated, this, [this](TextEditor::TextDocument *document) {
if (m_client && m_uri == DocumentUri::fromFilePath(document->filePath()))
if (m_client && m_uri == m_client->hostPathToServerUri(document->filePath()))
m_client->documentSymbolCache()->requestSymbols(m_uri, Schedule::Delayed);
});
@@ -375,7 +375,7 @@ Utils::TreeViewComboBox *LanguageClientOutlineWidgetFactory::createComboBox(
OutlineComboBox::OutlineComboBox(Client *client, TextEditor::BaseTextEditor *editor)
: m_client(client)
, m_editorWidget(editor->editorWidget())
, m_uri(DocumentUri::fromFilePath(editor->document()->filePath()))
, m_uri(m_client->hostPathToServerUri(editor->document()->filePath()))
{
m_model.setSymbolStringifier(client->symbolStringifier());
m_proxyModel.setSourceModel(&m_model);