ClangCodeModel: Implement following a symbol to its type

Making use of LSP's "Go To Type Definition".
Just the backend for now, UI to follow.

Change-Id: Id73b2cf701eab03913477f6d4d3093e257e80dbd
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Christian Kandeler
2022-09-26 11:53:22 +02:00
parent e3b67799d4
commit 813c6fbd81
8 changed files with 90 additions and 35 deletions

View File

@@ -34,6 +34,8 @@ Q_DECLARE_LOGGING_CATEGORY(clangdLogAst);
void setupClangdConfigFile();
enum class FollowTo { SymbolDef, SymbolType };
class ClangdClient : public LanguageClient::Client
{
Q_OBJECT
@@ -55,6 +57,7 @@ public:
CppEditor::CppEditorWidget *editorWidget,
const Utils::LinkHandler &callback,
bool resolveTarget,
FollowTo followTo,
bool openInSplit);
void switchDeclDef(TextEditor::TextDocument *document,