1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 21:55:07 +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

@ -59,14 +59,14 @@ static void open_default_project_file(const String& project_path);
int main(int argc, char** argv)
{
if (pledge("stdio tty accept rpath cpath wpath shared_buffer proc exec unix fattr thread unix", nullptr) < 0) {
if (pledge("stdio tty accept rpath cpath wpath shared_buffer proc exec unix fattr thread unix sendfd", nullptr) < 0) {
perror("pledge");
return 1;
}
auto app = GUI::Application::construct(argc, argv);
if (pledge("stdio tty accept rpath cpath wpath shared_buffer proc exec fattr thread unix", nullptr) < 0) {
if (pledge("stdio tty accept rpath cpath wpath shared_buffer proc exec fattr thread unix sendfd", nullptr) < 0) {
perror("pledge");
return 1;
}