From dc6593a84a9d4d9c9dc2533e84c83c876b2e0155 Mon Sep 17 00:00:00 2001 From: Damien Rajon <145502+pyrho@users.noreply.github.com> Date: Sun, 29 Nov 2020 14:24:52 +0100 Subject: [PATCH] doc: fix lsp statusline examle (#13286) Co-authored-by: Damien Rajon --- runtime/doc/lsp.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 5747ba6044..78829fbba1 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1062,9 +1062,9 @@ get_count({bufnr}, {severity}, {client_id}) let sl = '' if luaeval('not vim.tbl_isempty(vim.lsp.buf_get_clients(0))') let sl.='%#MyStatuslineLSP#E:' - let sl.='%#MyStatuslineLSPErrors#%{luaeval("vim.lsp.diagnostic.get_count([[Error]])")}' + let sl.='%#MyStatuslineLSPErrors#%{luaeval("vim.lsp.diagnostic.get_count(vim.fn.bufnr('%'), [[Error]])")}' let sl.='%#MyStatuslineLSP# W:' - let sl.='%#MyStatuslineLSPWarnings#%{luaeval("vim.lsp.diagnostic.get_count([[Warning]])")}' + let sl.='%#MyStatuslineLSPWarnings#%{luaeval("vim.lsp.diagnostic.get_count(vim.fn.bufnr('%'), [[Warning]])")}' else let sl.='%#MyStatuslineLSPErrors#off' endif