Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
maximedenes committed Oct 27, 2023
1 parent 6dee1b6 commit da857d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions controller/lspManager.ml
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,14 @@ let handle_lsp_event = function
| Request req ->
log @@ "ui request: " ^ req.method_;
begin match Lsp.Client_request.of_jsonrpc req with
| Error(e) -> log @@ "Error decoding request: " ^ e; []
| Error message ->
log @@ "Error decoding request: " ^ message;
output_json @@ Jsonrpc.Response.(yojson_of_t @@ error req.id (Error.make ~code:RequestFailed ~message ()));
[]
| Ok(E r) ->
let resp, events = dispatch_request r in
let resp = Lsp.Client_request.yojson_of_result r resp in
output_json resp;
output_json Jsonrpc.Response.(yojson_of_t @@ ok req.id resp);
events
end
| Notification notif ->
Expand Down
5 changes: 3 additions & 2 deletions jasmin-language-server.opam
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ depends: [
"ppx_deriving"
"sexplib"
"menhirLib"
"lsp"
"jsonrpc"
"lsp" { >= "1.15"}
"jsonrpc" { >= "1.15"}
"sel" {>= "0.4.0"}
#From jasmin-compiler
"ocaml" { >= "4.11" & build }
"batteries" {>= "3.4"}
Expand Down

0 comments on commit da857d4

Please sign in to comment.