Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation error #66

Merged
merged 1 commit into from
Feb 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix deprecation error
Fix deprecation error when using nvim_lsp as diagnostic tool engine.
  • Loading branch information
NTBBloodbath authored Feb 14, 2021
commit 0aacc43f139b7b26bedcb9c4e4c0689e4ce2c466
8 changes: 4 additions & 4 deletions autoload/spaceline/diagnostic.vim
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ endfunction

function! s:diagnostic_nvim_lsp_error()
if luaeval('#vim.lsp.buf_get_clients(0) ~= 0')
if luaeval("vim.lsp.util.buf_diagnostics_count(\"Error\")") == v:null
if luaeval("vim.lsp.diagnostic.get_count(\"Error\")") == v:null
return ''
else
return g:spaceline_errorsign. luaeval("vim.lsp.util.buf_diagnostics_count(\"Error\")")
return g:spaceline_errorsign. luaeval("vim.lsp.diagnostic.get_count(\"Error\")")
end
else
return ''
Expand All @@ -73,10 +73,10 @@ endfunction

function! s:diagnostic_nvim_lsp_warn()
if luaeval('#vim.lsp.buf_get_clients(0) ~= 0')
if luaeval("vim.lsp.util.buf_diagnostics_count(\"Warning\")") == v:null
if luaeval("vim.lsp.diagnostic.get_count(\"Warning\")") == v:null
return ''
else
return g:spaceline_warnsign. luaeval("vim.lsp.util.buf_diagnostics_count(\"Warning\")")
return g:spaceline_warnsign. luaeval("vim.lsp.diagnostic.get_count(\"Warning\")")
end
else
return ''
Expand Down