Updated plugins
This commit is contained in:
@@ -2,6 +2,25 @@ scriptencoding utf8
|
||||
" Author: w0rp <devw0rp@gmail.com>
|
||||
" Description: Draws error and warning signs into signcolumn
|
||||
|
||||
" This flag can be set to some integer to control the maximum number of signs
|
||||
" that ALE will set.
|
||||
let g:ale_max_signs = get(g:, 'ale_max_signs', -1)
|
||||
" This flag can be set to 1 to enable changing the sign column colors when
|
||||
" there are errors.
|
||||
let g:ale_change_sign_column_color = get(g:, 'ale_change_sign_column_color', 0)
|
||||
" These variables dictate what signs are used to indicate errors and warnings.
|
||||
let g:ale_sign_error = get(g:, 'ale_sign_error', '>>')
|
||||
let g:ale_sign_style_error = get(g:, 'ale_sign_style_error', g:ale_sign_error)
|
||||
let g:ale_sign_warning = get(g:, 'ale_sign_warning', '--')
|
||||
let g:ale_sign_style_warning = get(g:, 'ale_sign_style_warning', g:ale_sign_warning)
|
||||
let g:ale_sign_info = get(g:, 'ale_sign_info', g:ale_sign_warning)
|
||||
" This variable sets an offset which can be set for sign IDs.
|
||||
" This ID can be changed depending on what IDs are set for other plugins.
|
||||
" The dummy sign will use the ID exactly equal to the offset.
|
||||
let g:ale_sign_offset = get(g:, 'ale_sign_offset', 1000000)
|
||||
" This flag can be set to 1 to keep sign gutter always open
|
||||
let g:ale_sign_column_always = get(g:, 'ale_sign_column_always', 0)
|
||||
|
||||
if !hlexists('ALEErrorSign')
|
||||
highlight link ALEErrorSign error
|
||||
endif
|
||||
@@ -60,55 +79,35 @@ execute 'sign define ALEInfoSign text=' . g:ale_sign_info
|
||||
\ . ' texthl=ALEInfoSign linehl=ALEInfoLine'
|
||||
sign define ALEDummySign
|
||||
|
||||
let s:error_priority = 1
|
||||
let s:warning_priority = 2
|
||||
let s:info_priority = 3
|
||||
let s:style_error_priority = 4
|
||||
let s:style_warning_priority = 5
|
||||
|
||||
function! ale#sign#GetSignName(sublist) abort
|
||||
let l:priority = s:style_warning_priority
|
||||
let l:priority = g:ale#util#style_warning_priority
|
||||
|
||||
" Determine the highest priority item for the line.
|
||||
for l:item in a:sublist
|
||||
if l:item.type is# 'I'
|
||||
let l:item_priority = s:info_priority
|
||||
elseif l:item.type is# 'W'
|
||||
if get(l:item, 'sub_type', '') is# 'style'
|
||||
let l:item_priority = s:style_warning_priority
|
||||
else
|
||||
let l:item_priority = s:warning_priority
|
||||
endif
|
||||
else
|
||||
if get(l:item, 'sub_type', '') is# 'style'
|
||||
let l:item_priority = s:style_error_priority
|
||||
else
|
||||
let l:item_priority = s:error_priority
|
||||
endif
|
||||
endif
|
||||
let l:item_priority = ale#util#GetItemPriority(l:item)
|
||||
|
||||
if l:item_priority < l:priority
|
||||
if l:item_priority > l:priority
|
||||
let l:priority = l:item_priority
|
||||
endif
|
||||
endfor
|
||||
|
||||
if l:priority is# s:error_priority
|
||||
if l:priority is# g:ale#util#error_priority
|
||||
return 'ALEErrorSign'
|
||||
endif
|
||||
|
||||
if l:priority is# s:warning_priority
|
||||
if l:priority is# g:ale#util#warning_priority
|
||||
return 'ALEWarningSign'
|
||||
endif
|
||||
|
||||
if l:priority is# s:style_error_priority
|
||||
if l:priority is# g:ale#util#style_error_priority
|
||||
return 'ALEStyleErrorSign'
|
||||
endif
|
||||
|
||||
if l:priority is# s:style_warning_priority
|
||||
if l:priority is# g:ale#util#style_warning_priority
|
||||
return 'ALEStyleWarningSign'
|
||||
endif
|
||||
|
||||
if l:priority is# s:info_priority
|
||||
if l:priority is# g:ale#util#info_priority
|
||||
return 'ALEInfoSign'
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user