Skip to content

Commit 985e773

Browse files
authored
Add missing jsonrpc fields to LSP (#301)
This was conflicting with LSP specification and thus Zed extension couldn't communicate with framls.
1 parent 7bdea7c commit 985e773

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Lsp/Message.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ type hover_params = {
136136
let to_hover_params json =
137137
let text_document =
138138
json |> member "textDocument" |> to_text_document_identifier in
139-
let position =
139+
let position =
140140
json |> member "position" |> to_position in
141141
let work_done_token =
142142
json |> member "workDoneToken" |> to_progress_token_option in
@@ -553,11 +553,13 @@ let json_of_response response =
553553
id and either result or error fields are required even if null *)
554554
| Ok result ->
555555
`Assoc [
556+
("jsonrpc", from_string response.jsonrpc);
556557
("id", from_option from_id response.id);
557558
("result", from_server_result result);
558559
]
559560
| Error error ->
560561
`Assoc [
562+
("jsonrpc", from_string response.jsonrpc);
561563
("id", from_option from_id response.id);
562564
("error", from_response_error error);
563565
]

0 commit comments

Comments
 (0)