mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-10 05:02:54 +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:
parent
098070b767
commit
e7e179212c
Notes:
sideshowbarker
2024-07-19 01:17:36 +09:00
Author: https://github.com/bugaevc
Commit: e7e179212c
Pull-request: https://github.com/SerenityOS/serenity/pull/4130
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
12 changed files with 60 additions and 56 deletions
|
@ -36,9 +36,9 @@ void ServerConnection::handle(const Messages::LanguageClient::AutoCompleteSugges
|
|||
m_language_client->provide_autocomplete_suggestions(message.suggestions());
|
||||
}
|
||||
|
||||
void LanguageClient::open_file(const String& path)
|
||||
void LanguageClient::open_file(const String& path, int fd)
|
||||
{
|
||||
m_connection.post_message(Messages::LanguageServer::FileOpened(path));
|
||||
m_connection.post_message(Messages::LanguageServer::FileOpened(path, fd));
|
||||
}
|
||||
|
||||
void LanguageClient::set_file_content(const String& path, const String& content)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue