1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47:35 +00:00

LanguageServers/Cpp: Add 'FindDeclaration' capability

The C++ LanguageServer can now find the matching declaration for
variable names, function calls, struct/class types and properties.

When clicking on one of the above with Ctrl pressed, HackStudio will
ask the language server to find a matching declaration, and navigate
to the result in the Editor. :^)
This commit is contained in:
Itamar 2021-02-20 12:27:39 +02:00 committed by Andreas Kling
parent d3ff82ba80
commit 5bc82c0185
12 changed files with 150 additions and 38 deletions

View file

@ -57,6 +57,7 @@ private:
virtual void handle(const Messages::LanguageServer::SetFileContent&) override;
virtual void handle(const Messages::LanguageServer::AutoCompleteSuggestions&) override;
virtual void handle(const Messages::LanguageServer::SetAutoCompleteMode&) override { }
virtual void handle(const Messages::LanguageServer::FindDeclaration&) override {};
RefPtr<GUI::TextDocument> document_for(const String& file_name);