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

Commit

Permalink
Merge pull request #35 from ndreas/fix/diagnostics-changed-event
Browse files Browse the repository at this point in the history
Fix LspDiagnosticsChanged not firing
  • Loading branch information
haorenW1025 authored Jun 30, 2020
2 parents 68ef6f0 + eca5f6e commit ac7ec68
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ function M.publish_diagnostics(bufnr)
util.buf_diagnostics_virtual_text(bufnr, result.diagnostics)
end
M.diagnostics_loclist(result)
M.trigger_diagnostics_changed()
end

vim.schedule_wrap(function()
M.trigger_diagnostics_changed = vim.schedule_wrap(function()
vim.api.nvim_command("doautocmd User LspDiagnosticsChanged")
end)
end
end)

function M.refresh_diagnostics()
local bufnr = vim.api.nvim_win_get_buf(0)
Expand Down

0 comments on commit ac7ec68

Please sign in to comment.