[add] ycm's toggle and doc

This commit is contained in:
kazukazuinaina 2020-04-15 12:08:09 +09:00
parent 7c31850381
commit 15a1a3ccc7
2 changed files with 9 additions and 4 deletions

View File

@ -1,8 +1,13 @@
" MIT License. Copyright (c) 2015-2019 Evgeny Firsov et al. " MIT License. Copyright (c) 2015-2019 Evgeny Firsov et al.
" Plugin: https://github.com/ycm-core/YouCompleteMe
" vim: et ts=2 sts=2 sw=2 " vim: et ts=2 sts=2 sw=2
scriptencoding utf-8 scriptencoding utf-8
if !exists('g:loaded_youcompleteme')
finish
endif
let s:spc = g:airline_symbols.space let s:spc = g:airline_symbols.space
let s:error_symbol = get(g:, 'airline#extensions#ycm#error_symbol', 'E:') let s:error_symbol = get(g:, 'airline#extensions#ycm#error_symbol', 'E:')
let s:warning_symbol = get(g:, 'airline#extensions#ycm#warning_symbol', 'W:') let s:warning_symbol = get(g:, 'airline#extensions#ycm#warning_symbol', 'W:')
@ -12,8 +17,8 @@ function! airline#extensions#ycm#init(ext)
call airline#parts#define_function('ycm_warning_count', 'airline#extensions#ycm#get_warning_count') call airline#parts#define_function('ycm_warning_count', 'airline#extensions#ycm#get_warning_count')
endfunction endfunction
function! airline#extensions#ycm#get_error_count() function! airline#extensions#ycm#get_error_count() abort
if exists(':YcmDiag') && exists("*youcompleteme#GetErrorCount") if exists("*youcompleteme#GetErrorCount")
let cnt = youcompleteme#GetErrorCount() let cnt = youcompleteme#GetErrorCount()
if cnt != 0 if cnt != 0
@ -25,7 +30,7 @@ function! airline#extensions#ycm#get_error_count()
endfunction endfunction
function! airline#extensions#ycm#get_warning_count() function! airline#extensions#ycm#get_warning_count()
if exists(':YcmDiag') && exists("*youcompleteme#GetWarningCount") if exists("*youcompleteme#GetWarningCount")
let cnt = youcompleteme#GetWarningCount() let cnt = youcompleteme#GetWarningCount()
if cnt != 0 if cnt != 0

View File

@ -1517,7 +1517,7 @@ be updated automatically. Either re-enter the tab or press <F5> two times.
\ airline#extensions#tabline#xtabline#prev_buffer(v:count) : "\<Left>" \ airline#extensions#tabline#xtabline#prev_buffer(v:count) : "\<Left>"
------------------------------------- *airline-ycm* ------------------------------------- *airline-ycm*
YouCompleteMe <https://github.com/Valloric/YouCompleteMe> YouCompleteMe <https://github.com/ycm-core/YouCompleteMe>
Shows number of errors and warnings in the current file detected by YCM. Shows number of errors and warnings in the current file detected by YCM.