summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-23 09:37:48 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-23 09:53:55 +0200
commit0af69e8917153a1c6d0895f44bd404c3bb81c268 (patch)
tree10efe7ee2fa6399dc5e3a75be79a93aacab40619
parent67b47d62f32581ba2b3829fa4dcedaaa70a7bd07 (diff)
downloadserenity-0af69e8917153a1c6d0895f44bd404c3bb81c268.zip
HackStudio: Greet language servers asynchronously
There's no need to wait for a response after we've sent the project path to a newly connected language server.
-rw-r--r--Userland/DevTools/HackStudio/LanguageClient.h2
-rw-r--r--Userland/DevTools/HackStudio/LanguageServers/LanguageServer.ipc2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageClient.h b/Userland/DevTools/HackStudio/LanguageClient.h
index 714a54f670..76f13e8d1f 100644
--- a/Userland/DevTools/HackStudio/LanguageClient.h
+++ b/Userland/DevTools/HackStudio/LanguageClient.h
@@ -34,11 +34,11 @@ public:
: IPC::ServerConnection<LanguageClientEndpoint, LanguageServerEndpoint>(*this, socket)
{
m_project_path = project_path;
+ async_greet(m_project_path);
}
virtual void handshake() override
{
- greet(m_project_path);
}
WeakPtr<LanguageClient> language_client() { return m_current_language_client; }
diff --git a/Userland/DevTools/HackStudio/LanguageServers/LanguageServer.ipc b/Userland/DevTools/HackStudio/LanguageServers/LanguageServer.ipc
index 1ab41a93ea..668ad0a6e9 100644
--- a/Userland/DevTools/HackStudio/LanguageServers/LanguageServer.ipc
+++ b/Userland/DevTools/HackStudio/LanguageServers/LanguageServer.ipc
@@ -1,6 +1,6 @@
endpoint LanguageServer
{
- greet(String project_root) => ()
+ greet(String project_root) =|
file_opened(String filename, IPC::File file) =|
file_edit_insert_text(String filename, String text, i32 start_line, i32 start_column) =|