install.fairie/dotfiles/.vim/plugged/vim-airline/autoload/airline/extensions/vim9lsp.vim
Git E2E Dev Test Username 6892bd7dbd git subrepo clone https://github.com/vim-airline/vim-airline.git ./dotfiles/.vim/plugged/vim-airline
subrepo:
  subdir:   "dotfiles/.vim/plugged/vim-airline"
  merged:   "0ed7b8b"
upstream:
  origin:   "https://github.com/vim-airline/vim-airline.git"
  branch:   "master"
  commit:   "0ed7b8b"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:36:08 -04:00

27 lines
978 B
VimL

" MIT License. Copyright (c) 2021 DEMAREST Maxime (maxime@indelog.fr)
" Plugin: https://github.com/yegappan/lsp
" vim: et ts=2 sts=2 sw=2
scriptencoding utf-8
if !exists('*lsp#errorCount')
finish
endif
let s:error_symbol = get(g:, 'airline#extensions#vim9lsp#error_symbol', 'E:')
let s:warning_symbol = get(g:, 'airline#extensions#vim9lsp#warning_symbol', 'W:')
function! airline#extensions#vim9lsp#get_warnings() abort
let res = get(lsp#errorCount(), 'Warn', 0)
return res > 0 ? s:warning_symbol . res : ''
endfunction
function! airline#extensions#vim9lsp#get_errors() abort
let res = get(lsp#errorCount(), 'Error', 0)
return res > 0 ? s:error_symbol . res : ''
endfunction
function! airline#extensions#vim9lsp#init(ext) abort
call airline#parts#define_function('vim9lsp_warning_count', 'airline#extensions#vim9lsp#get_warnings')
call airline#parts#define_function('vim9lsp_error_count', 'airline#extensions#vim9lsp#get_errors')
endfunction