Merge pull request #1691 from silenc3r/master
ALE: add option to disable line numbers
This commit is contained in:
commit
2ba64a88fd
|
@ -5,6 +5,7 @@ scriptencoding utf-8
|
||||||
|
|
||||||
let s:error_symbol = get(g:, 'airline#extensions#ale#error_symbol', 'E:')
|
let s:error_symbol = get(g:, 'airline#extensions#ale#error_symbol', 'E:')
|
||||||
let s:warning_symbol = get(g:, 'airline#extensions#ale#warning_symbol', 'W:')
|
let s:warning_symbol = get(g:, 'airline#extensions#ale#warning_symbol', 'W:')
|
||||||
|
let s:show_line_numbers = get(g:, 'airline#extensions#ale#show_line_numbers', 1)
|
||||||
|
|
||||||
function! s:airline_ale_count(cnt, symbol)
|
function! s:airline_ale_count(cnt, symbol)
|
||||||
return a:cnt ? a:symbol. a:cnt : ''
|
return a:cnt ? a:symbol. a:cnt : ''
|
||||||
|
@ -52,7 +53,11 @@ function! airline#extensions#ale#get(type)
|
||||||
let num = is_err ? counts[0] : counts[1]
|
let num = is_err ? counts[0] : counts[1]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return s:airline_ale_count(num, symbol) . <sid>airline_ale_get_line_number(num, a:type)
|
if s:show_line_numbers == 1
|
||||||
|
return s:airline_ale_count(num, symbol) . <sid>airline_ale_get_line_number(num, a:type)
|
||||||
|
else
|
||||||
|
return s:airline_ale_count(num, symbol)
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#ale#get_warning()
|
function! airline#extensions#ale#get_warning()
|
||||||
|
|
|
@ -1023,6 +1023,9 @@ ale <https://github.com/w0rp/ale>
|
||||||
<
|
<
|
||||||
* ale warning >
|
* ale warning >
|
||||||
let airline#extensions#ale#warning_symbol = 'W:'
|
let airline#extensions#ale#warning_symbol = 'W:'
|
||||||
|
|
||||||
|
* ale show_line_numbers >
|
||||||
|
let airline#extensions#ale#show_line_numbers = 1
|
||||||
<
|
<
|
||||||
* ale open_lnum_symbol >
|
* ale open_lnum_symbol >
|
||||||
let airline#extensions#ale#open_lnum_symbol = '(L'
|
let airline#extensions#ale#open_lnum_symbol = '(L'
|
||||||
|
|
Loading…
Reference in New Issue