mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-05 01:17:46 +08:00
#2403 - Make ale_disable_lsp apply consistently, and document it better
This commit is contained in:
@@ -97,7 +97,7 @@ function! s:Lint(buffer, should_lint_file, timer_id) abort
|
||||
" Apply ignore lists for linters only if needed.
|
||||
let l:ignore_config = ale#Var(a:buffer, 'linters_ignore')
|
||||
let l:disable_lsp = ale#Var(a:buffer, 'disable_lsp')
|
||||
let l:linters = !empty(l:ignore_config)
|
||||
let l:linters = !empty(l:ignore_config) || l:disable_lsp
|
||||
\ ? ale#engine#ignore#Exclude(l:filetype, l:linters, l:ignore_config, l:disable_lsp)
|
||||
\ : l:linters
|
||||
|
||||
|
||||
@@ -10,6 +10,11 @@ endif
|
||||
|
||||
" Check if diagnostics for a particular linter should be ignored.
|
||||
function! s:ShouldIgnore(buffer, linter_name) abort
|
||||
" Ignore all diagnostics if LSP integration is disabled.
|
||||
if ale#Var(a:buffer, 'disable_lsp')
|
||||
return 1
|
||||
endif
|
||||
|
||||
let l:config = ale#Var(a:buffer, 'linters_ignore')
|
||||
|
||||
" Don't load code for ignoring diagnostics if there's nothing to ignore.
|
||||
|
||||
Reference in New Issue
Block a user