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

Commit 62d658d

Browse files
committed
avoid overwriting users location list
1 parent 0367068 commit 62d658d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/diagnostic.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ function M.diagnostics_loclist(local_result)
6666
v.uri = v.uri or uri
6767
end
6868
end
69-
vim.lsp.util.set_loclist(util.locations_to_items(local_result))
69+
if #vim.fn.getloclist(vim.fn.winnr()) == 0 then
70+
vim.lsp.util.set_loclist(util.locations_to_items(local_result))
71+
end
7072
end
7173

7274
function M.publish_diagnostics(bufnr)

0 commit comments

Comments
 (0)