Skip to content

Commit 339a4ca

Browse files
committed
fix(statusline): Diagnoatics are now shown per buffer
1 parent ede5576 commit 339a4ca

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lua/bars/components/statusline.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,17 +178,13 @@ slC.diagnostics = function (buffer, window, config)
178178

179179
config = config or {};
180180

181-
local diagnostics_count;
181+
local diagnostics_count = vim.diagnostic.count(buffer);
182182
local clients = vim.lsp.buf_get_clients(buffer);
183183

184184
if #clients == 0 and config.auto_hide == true then
185185
return "";
186186
end
187187

188-
vim.api.nvim_buf_call(buffer, function ()
189-
diagnostics_count = vim.diagnostic.count();
190-
end);
191-
192188
if not diagnostics_count then
193189
return "";
194190
end

0 commit comments

Comments
 (0)