1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

HackStudio: Send an open file to language servers

Language servers will now receive an open file instead of just its path. This
means the language servers no longer need to access the filesystem to open the
file themselves.

The C++ language server now has no filesystem access whatsoever (although we
might need to relax this in the future if it learns to complete #include paths),
while the Shell language server can read /etc/passwd (it wants that in order to
get the user's home directory) and browse (but not read!) the whole file system
tree for completing paths.
This commit is contained in:
Sergey Bugaev 2020-11-21 22:12:37 +03:00 committed by Andreas Kling
parent 098070b767
commit e7e179212c
12 changed files with 60 additions and 56 deletions

View file

@ -1,8 +1,8 @@
endpoint LanguageServer = 8001
{
Greet(String project_root) => (i32 client_id)
Greet() => (i32 client_id)
FileOpened(String file_name) =|
FileOpened(String file_name, IPC::File file) =|
FileEditInsertText(String file_name, String text, i32 start_line, i32 start_column) =|
FileEditRemoveText(String file_name, i32 start_line, i32 start_column, i32 end_line, i32 end_column) =|
SetFileContent(String file_name, String content) =|