mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +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
Notes:
sideshowbarker
2024-07-18 21:53:01 +09:00
Author: https://github.com/itamar8910
Commit: 4b483071fb
Pull-request: https://github.com/SerenityOS/serenity/pull/5543
Issue: https://github.com/SerenityOS/serenity/issues/5478
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