mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-25 23:14:50 +02:00
Merge pull request #2593 from indelog/indelog-vim9-lsp
Fix: [vim9lsp] ErrorCount method updated
This commit is contained in:
commit
009ba4e9d0
@ -472,7 +472,7 @@ function! airline#extensions#load()
|
|||||||
call add(s:loaded_ext, 'battery')
|
call add(s:loaded_ext, 'battery')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (get(g:, 'airline#extensions#vim9lsp#enabled', 1) && exists('*lsp#errorCount'))
|
if (get(g:, 'airline#extensions#vim9lsp#enabled', 1) && exists('*lsp#lsp#ErrorCount'))
|
||||||
call airline#extensions#vim9lsp#init(s:ext)
|
call airline#extensions#vim9lsp#init(s:ext)
|
||||||
call add(s:loaded_ext, 'vim9lsp')
|
call add(s:loaded_ext, 'vim9lsp')
|
||||||
endif
|
endif
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
scriptencoding utf-8
|
scriptencoding utf-8
|
||||||
|
|
||||||
if !exists('*lsp#errorCount')
|
if !exists('*lsp#lsp#ErrorCount')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -12,12 +12,12 @@ let s:error_symbol = get(g:, 'airline#extensions#vim9lsp#error_symbol', 'E:')
|
|||||||
let s:warning_symbol = get(g:, 'airline#extensions#vim9lsp#warning_symbol', 'W:')
|
let s:warning_symbol = get(g:, 'airline#extensions#vim9lsp#warning_symbol', 'W:')
|
||||||
|
|
||||||
function! airline#extensions#vim9lsp#get_warnings() abort
|
function! airline#extensions#vim9lsp#get_warnings() abort
|
||||||
let res = get(lsp#errorCount(), 'Warn', 0)
|
let res = get(lsp#lsp#ErrorCount(), 'Warn', 0)
|
||||||
return res > 0 ? s:warning_symbol . res : ''
|
return res > 0 ? s:warning_symbol . res : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#vim9lsp#get_errors() abort
|
function! airline#extensions#vim9lsp#get_errors() abort
|
||||||
let res = get(lsp#errorCount(), 'Error', 0)
|
let res = get(lsp#lsp#ErrorCount(), 'Error', 0)
|
||||||
return res > 0 ? s:error_symbol . res : ''
|
return res > 0 ? s:error_symbol . res : ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user