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

Commit ac7ec68

Browse files
authored
Merge pull request #35 from ndreas/fix/diagnostics-changed-event
Fix LspDiagnosticsChanged not firing
2 parents 68ef6f0 + eca5f6e commit ac7ec68

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lua/diagnostic.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,12 @@ function M.publish_diagnostics(bufnr)
8787
util.buf_diagnostics_virtual_text(bufnr, result.diagnostics)
8888
end
8989
M.diagnostics_loclist(result)
90+
M.trigger_diagnostics_changed()
91+
end
9092

91-
vim.schedule_wrap(function()
93+
M.trigger_diagnostics_changed = vim.schedule_wrap(function()
9294
vim.api.nvim_command("doautocmd User LspDiagnosticsChanged")
93-
end)
94-
end
95+
end)
9596

9697
function M.refresh_diagnostics()
9798
local bufnr = vim.api.nvim_win_get_buf(0)

0 commit comments

Comments
 (0)