From 25e1b4bc02d5b77612afafa476df75b82a67f783 Mon Sep 17 00:00:00 2001 From: haorenW1025 Date: Sun, 24 May 2020 07:35:55 +0000 Subject: [PATCH] fix: error in command line mode(#20) --- lua/diagnostic.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/diagnostic.lua b/lua/diagnostic.lua index be2ab27..d88583b 100644 --- a/lua/diagnostic.lua +++ b/lua/diagnostic.lua @@ -69,6 +69,7 @@ function M.diagnostics_loclist(local_result) end function M.publish_diagnostics(bufnr) + if vim.fn.getcmdwintype() == ':' then return end if #vim.lsp.buf_get_clients() == 0 then return end local result = M.bufferDiagnostic[bufnr] if result == nil then return end