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)
83
83
messaging .register_client (client .id , client .name )
84
84
vim .api .nvim_command (' augroup lsp_aucmds' )
85
85
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()' )
87
87
88
88
-- If the client is a documentSymbolProvider, set up an autocommand
89
89
-- to update the containing symbol
Original file line number Diff line number Diff line change 1
1
-- 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
+
2
9
local function get_all_diagnostics (bufnr )
3
10
local result = {}
4
- local levels = {
5
- errors = ' Error' ,
6
- warnings = ' Warning' ,
7
- info = ' Information' ,
8
- hints = ' Hint'
9
- }
10
-
11
11
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 } )
13
13
end
14
14
15
15
return result
You can’t perform that action at this time.
0 commit comments