File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11-- Gather diagnostics
2- local function get_all_diagnostics ()
2+ local function get_all_diagnostics (bufnr )
33 local result = {}
44 local levels = {
55 errors = ' Error' ,
@@ -9,7 +9,7 @@ local function get_all_diagnostics()
99 }
1010
1111 for k , level in pairs (levels ) do
12- result [k ] = vim .lsp .diagnostic .get_count (0 , level )
12+ result [k ] = vim .lsp .diagnostic .get_count (bufnr , level )
1313 end
1414
1515 return result
Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ local aliases = {
1010 pyls_ms = ' MPLS' ,
1111}
1212
13- local function statusline_lsp ()
14- if # vim .lsp .buf_get_clients () == 0 then
13+ local function statusline_lsp (bufnr )
14+ bufnr = bufnr or 0
15+ if # vim .lsp .buf_get_clients (bufnr ) == 0 then
1516 return ' '
1617 end
1718
18- local buf_diagnostics = diagnostics ()
19+ local buf_diagnostics = diagnostics (bufnr )
1920 local buf_messages = messages ()
2021 local only_hint = true
2122 local some_diagnostics = false
You can’t perform that action at this time.
0 commit comments