From a5cf7e854b7afcd7ee1037840de5e01d5b64726a Mon Sep 17 00:00:00 2001 From: Michael Valladolid Date: Sun, 10 Mar 2019 00:50:25 +0800 Subject: set maximum number of autocomplete suggestions for results coming from LSP --- autoload/ale/completion.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autoload') 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 -- cgit v1.2.3