forked from qt-creator/qt-creator
ClangCodeModel: Add experimental clangd support
If the user has enabled clangd (default is off), we start up one instance per project when it is opened/changed (including build config switches), and trigger background indexing. So far, the index is used to provide results for locators and "Find Usages". Per-document functionality such as semantic highlighting and completion is still provided by libclang. Change-Id: I12532fca1b9c6278baab560e7238cba6189cde9f Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -47,6 +47,8 @@ class FollowSymbolInterface;
|
||||
class RefactoringEngineInterface;
|
||||
} // namespace CppTools
|
||||
|
||||
namespace LanguageClient { class Client; }
|
||||
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
@@ -77,6 +79,8 @@ public:
|
||||
|
||||
ClangProjectSettings &projectSettings(ProjectExplorer::Project *project) const;
|
||||
|
||||
LanguageClient::Client *clientForProject(const ProjectExplorer::Project *project);
|
||||
|
||||
static ClangModelManagerSupport *instance();
|
||||
|
||||
private:
|
||||
@@ -118,6 +122,11 @@ private:
|
||||
void connectToTextDocumentContentsChangedForUnsavedFile(TextEditor::TextDocument *textDocument);
|
||||
void connectToWidgetsMarkContextMenuRequested(QWidget *editorWidget);
|
||||
|
||||
void updateLanguageClient(ProjectExplorer::Project *project,
|
||||
const CppTools::ProjectInfo &projectInfo);
|
||||
LanguageClient::Client *createClient(ProjectExplorer::Project *project,
|
||||
const Utils::FilePath &jsonDbDir);
|
||||
|
||||
private:
|
||||
UiHeaderOnDiskManager m_uiHeaderOnDiskManager;
|
||||
BackendCommunicator m_communicator;
|
||||
|
||||
Reference in New Issue
Block a user