refactor diagnostics count to using diagnostics state (#999)

This commit is contained in:
Prabir Shrestha
2021-01-02 00:14:05 -08:00
committed by GitHub
parent 2eb8d16413
commit 098509278d
4 changed files with 29 additions and 63 deletions

View File

@@ -1120,7 +1120,7 @@ endfunction
" Return dict with diagnostic counts for current buffer
" { 'error': 1, 'warning': 0, 'information': 0, 'hint': 0 }
function! lsp#get_buffer_diagnostics_counts() abort
return lsp#ui#vim#diagnostics#get_buffer_diagnostics_counts()
return lsp#internal#diagnostics#state#_get_diagnostics_count_for_buffer(bufnr('%'))
endfunction
" Return first error line or v:null if there are no errors