mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-01 00:53:29 +08:00
Fix #2415 - Mark tsserver and LSP linters inactive again
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user