summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Valladolid <mikevalladolid@gmail.com>2019-03-10 00:50:25 +0800
committerMichael Valladolid <mikevalladolid@gmail.com>2019-03-10 00:50:25 +0800
commita5cf7e854b7afcd7ee1037840de5e01d5b64726a (patch)
tree79c384d5850f415f96c7358c74b33f344e68c5f0
parent8a0213f1fda005fe436d70e3bcc7b611b73a0855 (diff)
downloadale-a5cf7e854b7afcd7ee1037840de5e01d5b64726a.zip
set maximum number of autocomplete suggestions for results coming from LSP
-rw-r--r--autoload/ale/completion.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index 48fa3963..383f4a67 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -389,10 +389,10 @@ function! ale#completion#ParseLSPCompletions(response) abort
endfor
if has_key(l:info, 'prefix')
- return ale#completion#Filter(l:buffer, &filetype, l:results, l:info.prefix)
+ let l:results = ale#completion#Filter(l:buffer, &filetype, l:results, l:info.prefix)
endif
- return l:results
+ return l:results[: g:ale_completion_max_suggestions - 1]
endfunction
function! ale#completion#HandleTSServerResponse(conn_id, response) abort