[nvim] fix: statusline diagnostics
diagnostics are buffer-specific
This commit is contained in:
parent
0cb56c9a46
commit
407d9983a8
@ -99,7 +99,7 @@ local function get_mode_color(m)
|
||||
end
|
||||
|
||||
-- from https://github.com/nvim-lua/lsp-status.nvim/blob/master/lua/lsp-status/diagnostics.lua
|
||||
local function get_lsp_diagnostics(bufnr)
|
||||
local function get_lsp_diagnostics()
|
||||
local result = {}
|
||||
local levels = {
|
||||
errors = "Error",
|
||||
@ -110,7 +110,7 @@ local function get_lsp_diagnostics(bufnr)
|
||||
|
||||
for k, level in pairs(levels) do
|
||||
local count = 0
|
||||
local diags = vim.diagnostic.get(bufnr, { severity = level })
|
||||
local diags = vim.diagnostic.get(0, { severity = level })
|
||||
for _, _ in pairs(diags) do
|
||||
count = count + 1
|
||||
end
|
||||
|
Reference in New Issue
Block a user