mirror of
https://github.com/c-cube/linol.git
synced 2025-12-06 11:15:46 -05:00
more debug info
This commit is contained in:
parent
1710df0e7e
commit
11c4f36d02
2 changed files with 4 additions and 1 deletions
|
|
@ -144,6 +144,7 @@ module Make(IO : IO)
|
||||||
try_ @@ fun () ->
|
try_ @@ fun () ->
|
||||||
IO.return @@ J.from_string (Bytes.unsafe_to_string buf)
|
IO.return @@ J.from_string (Bytes.unsafe_to_string buf)
|
||||||
in
|
in
|
||||||
|
Log.debug (fun k->k "got json %a" J.pp j);
|
||||||
begin match Jsonrpc.Message.either_of_yojson j with
|
begin match Jsonrpc.Message.either_of_yojson j with
|
||||||
| m -> IO.return @@ Ok m
|
| m -> IO.return @@ Ok m
|
||||||
| exception _ ->
|
| exception _ ->
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,9 @@ module Make(IO : IO) = struct
|
||||||
| Lsp.Client_notification.TextDocumentDidChange {textDocument=doc; contentChanges=c} ->
|
| Lsp.Client_notification.TextDocumentDidChange {textDocument=doc; contentChanges=c} ->
|
||||||
let notify_back = new notify_back ~uri:doc.uri ~notify_back () in
|
let notify_back = new notify_back ~uri:doc.uri ~notify_back () in
|
||||||
begin match Hashtbl.find_opt docs doc.uri with
|
begin match Hashtbl.find_opt docs doc.uri with
|
||||||
| None -> IO.failwith "unknown document"
|
| None ->
|
||||||
|
Log.err (fun k->k "unknown document: '%s'" doc.uri);
|
||||||
|
IO.failwith "unknown document"
|
||||||
| Some st ->
|
| Some st ->
|
||||||
let old_content = st.content in
|
let old_content = st.content in
|
||||||
let new_doc: Lsp.Text_document.t =
|
let new_doc: Lsp.Text_document.t =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue