mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-28 12:32:27 +08:00
Add g:ale_disable_lsp and b:ale_disable_lsp to disable linters powered by LSP
This commit is contained in:
@@ -22,7 +22,7 @@ function! ale#engine#ignore#GetList(filetype, config) abort
|
||||
endfunction
|
||||
|
||||
" Given a List of linter descriptions, exclude the linters to be ignored.
|
||||
function! ale#engine#ignore#Exclude(filetype, all_linters, config) abort
|
||||
function! ale#engine#ignore#Exclude(filetype, all_linters, config, disable_lsp) abort
|
||||
let l:names_to_remove = ale#engine#ignore#GetList(a:filetype, a:config)
|
||||
let l:filtered_linters = []
|
||||
|
||||
@@ -37,6 +37,10 @@ function! ale#engine#ignore#Exclude(filetype, all_linters, config) abort
|
||||
endif
|
||||
endfor
|
||||
|
||||
if a:disable_lsp && has_key(l:linter, 'lsp') && l:linter.lsp isnot# ''
|
||||
let l:should_include = 0
|
||||
endif
|
||||
|
||||
if l:should_include
|
||||
call add(l:filtered_linters, l:linter)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user