ClangCodeModel: Use clangd for completion and function hint

Change-Id: I80160f3a40da18ac178682afe6caba5e5af6e3eb
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-06-18 16:30:03 +02:00
parent 67d2a4186b
commit e0e8fda580
62 changed files with 1569 additions and 187 deletions

View File

@@ -334,8 +334,7 @@ void ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project *pr
continue;
if (fallbackClient && fallbackClient->documentOpen(editor->textDocument()))
fallbackClient->closeDocument(editor->textDocument());
if (!client->documentOpen(editor->textDocument()))
client->openDocument(editor->textDocument());
client->openEditorDocument(editor);
ClangEditorDocumentProcessor::clearTextMarks(editor->textDocument()->filePath());
hasDocuments = true;
}
@@ -429,8 +428,8 @@ void ClangModelManagerSupport::onEditorOpened(Core::IEditor *editor)
// instead. Is this feasible?
ProjectExplorer::Project * const project
= ProjectExplorer::SessionManager::projectForFile(document->filePath());
if (Client * const client = clientForProject(project))
client->openDocument(textDocument);
if (ClangdClient * const client = clientForProject(project))
client->openEditorDocument(qobject_cast<TextEditor::BaseTextEditor *>(editor));
}
}