
FileDB wraps the access to the contents of project files. When asked to fetch a file, FileDB will either return its in-memory model of the file if it has been "opened" by the language-server protocol, or otherwise fetch it from the filesystem. Previously, the cpp language server did not pledge "rpath" and got access to the contents of files whenever they were opened by the language client. However, features like inspection of header files require the language server to get the content of files that were not opened by the client. The language server now pledges rpath but makes sure to only unveil the project's directory and /usr/include.
12 lines
506 B
Text
12 lines
506 B
Text
endpoint LanguageServer = 8001
|
|
{
|
|
Greet(String project_root) => ()
|
|
|
|
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) =|
|
|
SetAutoCompleteMode(String mode) =|
|
|
}
|