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

Commit

Permalink
fix: diagnostic on not exist buffer spam errors
Browse files Browse the repository at this point in the history
  • Loading branch information
haorenW1025 committed Jun 5, 2020
1 parent 3baf221 commit 6adf7ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ function M.diagnostics_loclist(local_result)
end

function M.publish_diagnostics(bufnr)
if vim.fn.filereadable(vim.fn.expand("%")) == 0 then
return
end
if vim.fn.getcmdwintype() == ':' then return end
if #vim.lsp.buf_get_clients() == 0 then return end
local result = M.bufferDiagnostic[bufnr]
Expand Down

0 comments on commit 6adf7ee

Please sign in to comment.