This repository was archived by the owner on Jul 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ function M.publish_diagnostics(bufnr)
7070 if # vim .lsp .buf_get_clients () == 0 then return end
7171 local result = M .bufferDiagnostic [bufnr ]
7272 if result == nil then return end
73+ vim .api .nvim_command (' lexpr []' )
7374 util .buf_clear_diagnostics (bufnr )
7475 util .buf_diagnostics_save_positions (bufnr , result .diagnostics )
7576 util .buf_diagnostics_underline (bufnr , result .diagnostics )
@@ -104,11 +105,13 @@ M.on_attach = function(_, _)
104105 -- Setup autocmd
105106 M .modifyCallback ()
106107 vim .api .nvim_command [[ augroup DiagnosticRefresh]]
107- vim .api .nvim_command [[ autocmd BufWinEnter,TabEnter <buffer> lua require'diagnostic'.refresh_diagnostics()]]
108+ vim .api .nvim_command (" autocmd! * <buffer>" )
109+ vim .api .nvim_command [[ autocmd BufEnter,BufWinEnter,TabEnter <buffer> lua require'diagnostic'.refresh_diagnostics()]]
108110 vim .api .nvim_command [[ augroup end]]
109111
110112 if vim .api .nvim_get_var (' diagnostic_insert_delay' ) == 1 then
111113 vim .api .nvim_command [[ augroup DiagnosticInsertDelay]]
114+ vim .api .nvim_command (" autocmd! * <buffer>" )
112115 vim .api .nvim_command [[ autocmd InsertLeave <buffer> lua require'diagnostic'.on_InsertLeave()]]
113116 vim .api .nvim_command [[ augroup end]]
114117 end
You can’t perform that action at this time.
0 commit comments