summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-22 21:14:48 +0100
committerw0rp <devw0rp@gmail.com>2018-07-22 21:14:56 +0100
commit81a8c77d2062fb7b9bb85d2835a64f01b80bb2a4 (patch)
tree40fea9c6b9a792c8134b04b2a5061390f4d763f1 /autoload
parent9c849da8c471aa9f31ff0217a71f9d6178938a13 (diff)
downloadale-81a8c77d2062fb7b9bb85d2835a64f01b80bb2a4.zip
#1692 - Only send completion requests to the first server supporting them
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/completion.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index 5c054dd7..7b3a0e82 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -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')