File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
-- Gather diagnostics
2
- local function get_all_diagnostics ()
2
+ local function get_all_diagnostics (bufnr )
3
3
local result = {}
4
4
local levels = {
5
5
errors = ' Error' ,
@@ -9,7 +9,7 @@ local function get_all_diagnostics()
9
9
}
10
10
11
11
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 )
13
13
end
14
14
15
15
return result
Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ local aliases = {
10
10
pyls_ms = ' MPLS' ,
11
11
}
12
12
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
15
16
return ' '
16
17
end
17
18
18
- local buf_diagnostics = diagnostics ()
19
+ local buf_diagnostics = diagnostics (bufnr )
19
20
local buf_messages = messages ()
20
21
local only_hint = true
21
22
local some_diagnostics = false
You can’t perform that action at this time.
0 commit comments