diff options
author | Itamar <itamar8910@gmail.com> | 2021-02-27 09:31:05 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-27 16:37:35 +0100 |
commit | 4b483071fb5f00afa50ef05d0e5857d9ccd7c686 (patch) | |
tree | 97ba6cb5aa50ed2e0bc2b0aaad4fe8464e2e7a10 /Userland/Libraries/LibGUI/AutocompleteProvider.h | |
parent | daf18e7777366d9b26a20d3e5788fa0cb66a7caa (diff) | |
download | serenity-4b483071fb5f00afa50ef05d0e5857d9ccd7c686.zip |
LanguageServers: Add ProjectLoaction, Declaration types and use in IPC
With this we can avoid passing (name, line, column) tuples in many
different places.
Diffstat (limited to 'Userland/Libraries/LibGUI/AutocompleteProvider.h')
-rw-r--r-- | Userland/Libraries/LibGUI/AutocompleteProvider.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/AutocompleteProvider.h b/Userland/Libraries/LibGUI/AutocompleteProvider.h index 6dd51864ee..2794a3b37d 100644 --- a/Userland/Libraries/LibGUI/AutocompleteProvider.h +++ b/Userland/Libraries/LibGUI/AutocompleteProvider.h @@ -29,6 +29,7 @@ #include <LibGUI/Forward.h> #include <LibGUI/TextEditor.h> #include <LibGUI/Window.h> +#include <LibIPC/Decoder.h> namespace GUI { @@ -55,6 +56,17 @@ public: Language language { Language::Unspecified }; }; + struct ProjectLocation { + String file; + size_t line { 0 }; + size_t column { 0 }; + }; + + struct Declaration { + String name; + ProjectLocation position; + }; + virtual void provide_completions(Function<void(Vector<Entry>)>) = 0; void attach(TextEditor& editor) |