summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-27 18:01:48 -0500
committerpommicket <pommicket@gmail.com>2022-12-27 18:01:48 -0500
commit1eaef3694d54d3d92f0b43304c72f5148b4e5db9 (patch)
treea9c9160699edee9bcecd918cc9e8ced59f7a61da /lsp-write.c
parent5cdae84d6a61d03173a86cbfc9c7fd9112e41237 (diff)
send "params": {} for initialized request
it's unclear whether the standard requires this, but gopls fails without it
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lsp-write.c b/lsp-write.c
index 5f6c858..ffa5337 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -342,11 +342,14 @@ static void write_request(LSP *lsp, LSPRequest *request) {
case LSP_REQUEST_WORKSPACE_FOLDERS:
assert(0);
break;
- case LSP_REQUEST_INITIALIZED:
case LSP_REQUEST_SHUTDOWN:
case LSP_REQUEST_EXIT:
// no params
break;
+ case LSP_REQUEST_INITIALIZED:
+ write_key_obj_start(o, "params");
+ write_obj_end(o);
+ break;
case LSP_REQUEST_INITIALIZE: {
write_key_obj_start(o, "params");
write_key_number(o, "processId", process_get_id());