diff options
author | w0rp <devw0rp@gmail.com> | 2019-04-17 18:12:25 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-04-17 18:12:50 +0100 |
commit | fcc2c3ba71afa2a7965f3c1e9ec8c03381178180 (patch) | |
tree | d5b7d8d10cbb7f2934c9a9a0d2b7c636443d2bb5 /autoload | |
parent | 2eb68f6d23f51c33f3d64a15172c869e71d7829b (diff) | |
download | ale-fcc2c3ba71afa2a7965f3c1e9ec8c03381178180.zip |
Fix #2415 - Mark tsserver and LSP linters inactive again
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/engine.vim | 6 | ||||
-rw-r--r-- | autoload/ale/lsp_linter.vim | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index 6b312b4f..7db808d6 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -39,8 +39,8 @@ function! ale#engine#MarkLinterActive(info, linter) abort endif endfunction -function! ale#engine#MarkLinterInactive(info, linter) abort - call filter(a:info.active_linter_list, 'v:val.name isnot# a:linter.name') +function! ale#engine#MarkLinterInactive(info, linter_name) abort + call filter(a:info.active_linter_list, 'v:val.name isnot# a:linter_name') endfunction function! ale#engine#ResetExecutableCache() abort @@ -195,7 +195,7 @@ function! s:HandleExit(job_info, buffer, output, data) abort let l:next_chain_index = a:job_info.next_chain_index " Remove this job from the list. - call ale#engine#MarkLinterInactive(l:buffer_info, l:linter) + call ale#engine#MarkLinterInactive(l:buffer_info, l:linter.name) " Stop here if we land in the handle for a job completing if we're in " a sandbox. diff --git a/autoload/ale/lsp_linter.vim b/autoload/ale/lsp_linter.vim index d544916a..d55e67ce 100644 --- a/autoload/ale/lsp_linter.vim +++ b/autoload/ale/lsp_linter.vim @@ -27,12 +27,15 @@ function! s:HandleLSPDiagnostics(conn_id, response) abort let l:linter_name = s:lsp_linter_map[a:conn_id] let l:filename = ale#path#FromURI(a:response.params.uri) let l:buffer = bufnr(l:filename) + let l:info = get(g:ale_buffer_info, l:buffer, {}) - if s:ShouldIgnore(l:buffer, l:linter_name) + if empty(l:info) return endif - if l:buffer <= 0 + call ale#engine#MarkLinterInactive(l:info, l:linter_name) + + if s:ShouldIgnore(l:buffer, l:linter_name) return endif @@ -50,6 +53,8 @@ function! s:HandleTSServerDiagnostics(response, error_type) abort return endif + call ale#engine#MarkLinterInactive(l:info, l:linter_name) + if s:ShouldIgnore(l:buffer, l:linter_name) return endif |