Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit 783f389

Browse files
committed
fix: error in non lsp client buf
1 parent cd394d6 commit 783f389

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lua/diagnostic.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function M.diagnostics_loclist(local_result)
3636
end
3737

3838
function M.publish_diagnostics(bufnr)
39+
if #vim.lsp.buf_get_clients() == 0 then return end
3940
local result = M.bufferDiagnostic[bufnr]
4041
if result == nil then return end
4142
util.buf_clear_diagnostics(bufnr)

0 commit comments

Comments
 (0)