mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-06 19:43:29 +08:00
#1692 - Only send completion requests to the first server supporting them
This commit is contained in:
@@ -432,6 +432,11 @@ function! s:GetLSPCompletions(linter) abort
|
||||
let l:root = l:lsp_details.project_root
|
||||
|
||||
function! OnReady(...) abort closure
|
||||
" If we have sent a completion request already, don't send another.
|
||||
if b:ale_completion_info.request_id
|
||||
return
|
||||
endif
|
||||
|
||||
let l:Callback = a:linter.lsp is# 'tsserver'
|
||||
\ ? function('ale#completion#HandleTSServerResponse')
|
||||
\ : function('ale#completion#HandleLSPResponse')
|
||||
|
||||
Reference in New Issue
Block a user