From 0aacc43f139b7b26bedcb9c4e4c0689e4ce2c466 Mon Sep 17 00:00:00 2001 From: NTBBloodbath Date: Sat, 13 Feb 2021 22:01:22 -0400 Subject: [PATCH] Fix deprecation error Fix deprecation error when using nvim_lsp as diagnostic tool engine. --- autoload/spaceline/diagnostic.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/spaceline/diagnostic.vim b/autoload/spaceline/diagnostic.vim index 286eb22..dff981f 100644 --- a/autoload/spaceline/diagnostic.vim +++ b/autoload/spaceline/diagnostic.vim @@ -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 '' @@ -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 ''