diff --git a/autoload/ale/lsp_linter.vim b/autoload/ale/lsp_linter.vim index d55e67ce..3a596d62 100644 --- a/autoload/ale/lsp_linter.vim +++ b/autoload/ale/lsp_linter.vim @@ -33,8 +33,6 @@ function! s:HandleLSPDiagnostics(conn_id, response) abort return endif - call ale#engine#MarkLinterInactive(l:info, l:linter_name) - if s:ShouldIgnore(l:buffer, l:linter_name) return endif @@ -381,6 +379,10 @@ function! s:CheckWithLSP(linter, details) abort if a:linter.lsp is# 'tsserver' let l:message = ale#lsp#tsserver_message#Geterr(l:buffer) let l:notified = ale#lsp#Send(l:id, l:message) != 0 + + if l:notified + call ale#engine#MarkLinterActive(l:info, a:linter) + endif else let l:notified = ale#lsp#NotifyForChanges(l:id, l:buffer) endif @@ -391,10 +393,6 @@ function! s:CheckWithLSP(linter, details) abort let l:save_message = ale#lsp#message#DidSave(l:buffer) let l:notified = ale#lsp#Send(l:id, l:save_message) != 0 endif - - if l:notified - call ale#engine#MarkLinterActive(l:info, a:linter) - endif endfunction function! ale#lsp_linter#CheckWithLSP(buffer, linter) abort