File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ local function on_attach(client)
8383 messaging .register_client (client .id , client .name )
8484 vim .api .nvim_command (' augroup lsp_aucmds' )
8585 vim .api .nvim_command (' au! * <buffer>' )
86- vim .api .nvim_command (' au User LspDiagnosticsChanged lua require("lsp-status/redraw").redraw()' )
86+ vim .api .nvim_command (' au User DiagnosticChanged lua require("lsp-status/redraw").redraw()' )
8787
8888 -- If the client is a documentSymbolProvider, set up an autocommand
8989 -- to update the containing symbol
Original file line number Diff line number Diff line change 11-- Gather diagnostics
2+ local levels = {
3+ errors = vim .diagnostic .severity .ERROR ,
4+ warnings = vim .diagnostic .severity .WARN ,
5+ info = vim .diagnostic .severity .INFO ,
6+ hints = vim .diagnostic .severity .HINT ,
7+ }
8+
29local function get_all_diagnostics (bufnr )
310 local result = {}
4- local levels = {
5- errors = ' Error' ,
6- warnings = ' Warning' ,
7- info = ' Information' ,
8- hints = ' Hint'
9- }
10-
1111 for k , level in pairs (levels ) do
12- result [k ] = vim .lsp . diagnostic .get_count (bufnr , level )
12+ result [k ] = # vim .diagnostic .get (bufnr , { severity = level } )
1313 end
1414
1515 return result
You can’t perform that action at this time.
0 commit comments