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

Commit

Permalink
avoid overwriting users location list
Browse files Browse the repository at this point in the history
  • Loading branch information
haorenW1025 committed Sep 15, 2020
1 parent 0367068 commit 62d658d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ function M.diagnostics_loclist(local_result)
v.uri = v.uri or uri
end
end
vim.lsp.util.set_loclist(util.locations_to_items(local_result))
if #vim.fn.getloclist(vim.fn.winnr()) == 0 then
vim.lsp.util.set_loclist(util.locations_to_items(local_result))
end
end

function M.publish_diagnostics(bufnr)
Expand Down

0 comments on commit 62d658d

Please sign in to comment.