diff options
author | w0rp <devw0rp@gmail.com> | 2019-05-10 13:42:41 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-05-10 13:42:41 +0100 |
commit | 79e42fed14b35767d53d7d443a644a037e012b89 (patch) | |
tree | 9c9c1bef9cda93deeea57506f021a9054632f511 /autoload | |
parent | f444abdfe66696505cb891889b18c4144d12d4ea (diff) | |
download | ale-79e42fed14b35767d53d7d443a644a037e012b89.zip |
#2403 - Make ale_disable_lsp apply consistently, and document it better
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale.vim | 2 | ||||
-rw-r--r-- | autoload/ale/lsp_linter.vim | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/autoload/ale.vim b/autoload/ale.vim index a887834b..04329dfd 100644 --- a/autoload/ale.vim +++ b/autoload/ale.vim @@ -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 diff --git a/autoload/ale/lsp_linter.vim b/autoload/ale/lsp_linter.vim index 3a596d62..f70042dd 100644 --- a/autoload/ale/lsp_linter.vim +++ b/autoload/ale/lsp_linter.vim @@ -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. |