From 154cbe61c44400aed924e2f793516dbdde5a3781 Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Thu, 11 Jun 2020 13:02:35 +0900 Subject: lsp: remove output log at rpc.notify Since "rpc.send.payload" outputs the log with almost the same contents, delete the output here. --- runtime/lua/vim/lsp/rpc.lua | 1 - 1 file changed, 1 deletion(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/rpc.lua b/runtime/lua/vim/lsp/rpc.lua index 680e1ba6ae..64080cf4f2 100644 --- a/runtime/lua/vim/lsp/rpc.lua +++ b/runtime/lua/vim/lsp/rpc.lua @@ -376,7 +376,6 @@ local function start(cmd, cmd_args, handlers, extra_spawn_params) --@param params (table): Parameters for the invoked LSP method --@returns (bool) `true` if notification could be sent, `false` if not local function notify(method, params) - local _ = log.debug() and log.debug("rpc.notify", method, params) return encode_and_send { jsonrpc = "2.0"; method = method; -- cgit From 3b1db74963e30ad73b364746cf589cefa778b940 Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Thu, 11 Jun 2020 13:04:12 +0900 Subject: lsp: add key name to the output log value Unless we look at the code every time, we will not know what the value is, so add the key name. --- runtime/lua/vim/lsp.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 47dca40208..0cc3c01ca1 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -761,8 +761,12 @@ do text_document_did_change_handler = function(_, bufnr, changedtick, firstline, lastline, new_lastline, old_byte_size, old_utf32_size, old_utf16_size) - local _ = log.debug() and log.debug("on_lines", bufnr, changedtick, firstline, - lastline, new_lastline, old_byte_size, old_utf32_size, old_utf16_size, nvim_buf_get_lines(bufnr, firstline, new_lastline, true)) + + local _ = log.debug() and log.debug( + string.format("on_lines bufnr: %s, changedtick: %s, firstline: %s, lastline: %s, new_lastline: %s, old_byte_size: %s, old_utf32_size: %s, old_utf16_size: %s", + bufnr, changedtick, firstline, lastline, new_lastline, old_byte_size, old_utf32_size, old_utf16_size), + nvim_buf_get_lines(bufnr, firstline, new_lastline, true) + ) -- Don't do anything if there are no clients attached. if tbl_isempty(all_buffer_active_clients[bufnr] or {}) then -- cgit