nvimrc: Update deprecated LSP functions

This commit is contained in:
Rob Watson 2021-12-12 10:11:34 +01:00
parent b566a1e5f7
commit 488728cc61
1 changed files with 3 additions and 3 deletions

6
nvimrc
View File

@ -369,7 +369,7 @@ packadd! lightline.vim " https://github.com/itchyny/lightline.vim.git
set laststatus=2 set laststatus=2
function! LightlineLSPErrorText() function! LightlineLSPErrorText()
let l:count = luaeval("vim.lsp.diagnostic.get_count(0, [[Error]])") let l:count = luaeval("vim.diagnostic.get(0, [[Error]])")
if l:count == 0 if l:count == 0
return '' return ''
endif endif
@ -377,7 +377,7 @@ function! LightlineLSPErrorText()
endfunction endfunction
function! LightlineLSPWarningText() function! LightlineLSPWarningText()
let l:count = luaeval("vim.lsp.diagnostic.get_count(0, [[Warning]])") let l:count = luaeval("vim.diagnostic.get(0, [[Warning]])")
if l:count == 0 if l:count == 0
return '' return ''
endif endif
@ -385,7 +385,7 @@ function! LightlineLSPWarningText()
endfunction endfunction
function! LightlineLSPInformationText() function! LightlineLSPInformationText()
let l:count = luaeval("vim.lsp.diagnostic.get_count(0, [[Information]])") let l:count = luaeval("vim.diagnostic.get(0, [[Information]])")
if l:count == 0 if l:count == 0
return '' return ''
endif endif