doc: fix lsp statusline examle (#13286)

Co-authored-by: Damien Rajon <damien@askmarty.io>
This commit is contained in:
Damien Rajon 2020-11-29 14:24:52 +01:00 committed by GitHub
parent 8b2887bd56
commit dc6593a84a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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