#1692 - Only send completion requests to the first server supporting them

This commit is contained in:
w0rp
2018-07-22 21:14:48 +01:00
parent 9c849da8c4
commit 81a8c77d20
2 changed files with 66 additions and 11 deletions

View File

@@ -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')