]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Add sent messages to TraceLog
authorRoberto Castagnola <roberto.castagnola@gmail.com>
Thu, 27 Oct 2022 12:45:51 +0000 (14:45 +0200)
committerRoberto Castagnola <roberto.castagnola@gmail.com>
Fri, 28 Oct 2022 09:42:26 +0000 (11:42 +0200)
autoload/lsp/lspserver.vim

index 58d2884e2bb45defc0031617a0f80ea68f38c66d..74247750795fa5f5e6e6785ef8c74d334a8b55fc 100644 (file)
@@ -14,7 +14,7 @@ import './callhierarchy.vim' as callhier
 
 # LSP server standard output handler
 def Output_cb(lspserver: dict<any>, chan: channel, msg: any): void
-  util.TraceLog(false, msg->string())
+  util.TraceLog(false, $'Received: {msg->string()}')
   lspserver.data = msg
   lspserver.processMessages()
 enddef
@@ -261,6 +261,9 @@ def SendMessage(lspserver: dict<any>, content: dict<any>): void
     return
   endif
   ch->ch_sendexpr(content)
+  if content->has_key('id')
+    util.TraceLog(false, $'Sent: {content->string()}')
+  endif
 enddef
 
 # Send a sync RPC request message to the LSP server and return the received