set maximum number of autocomplete suggestions for results coming from LSP

This commit is contained in:
Michael Valladolid 2019-03-10 00:50:25 +08:00
parent 8a0213f1fd
commit a5cf7e854b
1 changed files with 2 additions and 2 deletions

View File

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