From efb4af44e60b2d1c8a4073dca89f8eddbed75cca Mon Sep 17 00:00:00 2001 From: Roberto Castagnola Date: Thu, 27 Oct 2022 14:45:51 +0200 Subject: [PATCH] Add sent messages to TraceLog --- autoload/lsp/lspserver.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/lsp/lspserver.vim b/autoload/lsp/lspserver.vim index 58d2884..7424775 100644 --- a/autoload/lsp/lspserver.vim +++ b/autoload/lsp/lspserver.vim @@ -14,7 +14,7 @@ import './callhierarchy.vim' as callhier # LSP server standard output handler def Output_cb(lspserver: dict, 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, content: dict): 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 -- 2.48.1