summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/AutocompleteProvider.h
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-02-27 09:31:05 +0200
committerAndreas Kling <kling@serenityos.org>2021-02-27 16:37:35 +0100
commit4b483071fb5f00afa50ef05d0e5857d9ccd7c686 (patch)
tree97ba6cb5aa50ed2e0bc2b0aaad4fe8464e2e7a10 /Userland/Libraries/LibGUI/AutocompleteProvider.h
parentdaf18e7777366d9b26a20d3e5788fa0cb66a7caa (diff)
downloadserenity-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.h12
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)