mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:47:34 +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:
parent
daf18e7777
commit
4b483071fb
10 changed files with 93 additions and 33 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue