1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:47:46 +00:00

LanguageServers: Add ProjectLoaction, Declaration types and use in IPC

With this we can avoid passing (name, line, column) tuples in many
different places.
This commit is contained in:
Itamar 2021-02-27 09:31:05 +02:00 committed by Andreas Kling
parent daf18e7777
commit 4b483071fb
10 changed files with 93 additions and 33 deletions

View file

@ -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)