1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 13:35:08 +00:00
serenity/DevTools/HackStudio/LanguageServers/LanguageServer.ipc
Sergey Bugaev e7e179212c 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.
2020-11-23 18:37:40 +01:00

11 lines
460 B
Text

endpoint LanguageServer = 8001
{
Greet() => (i32 client_id)
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) =|
AutoCompleteSuggestions(String file_name, i32 cursor_line, i32 cursor_column) =|
}