mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-08 12:34:51 +08:00
Fixes #2982 - Implement g:ale_exclude_highlights
Particular highlights can now be excluded by providing Lists of regular expressions.
This commit is contained in:
@@ -210,6 +210,12 @@ function! ale#highlight#SetHighlights(buffer, loclist) abort
|
||||
" Set the list in the buffer variable.
|
||||
call setbufvar(str2nr(a:buffer), 'ale_highlight_items', l:new_list)
|
||||
|
||||
let l:exclude_list = ale#Var(a:buffer, 'exclude_highlights')
|
||||
|
||||
if !empty(l:exclude_list)
|
||||
call filter(l:new_list, 'empty(ale#util#GetMatches(v:val.text, l:exclude_list))')
|
||||
endif
|
||||
|
||||
" Update highlights for the current buffer, which may or may not
|
||||
" be the buffer we just set highlights for.
|
||||
call ale#highlight#UpdateHighlights()
|
||||
|
||||
Reference in New Issue
Block a user