Limit the suggestions only after filtering them
This commit is contained in:
parent
27feab7e3a
commit
a6cc492a99
@ -91,7 +91,7 @@ function! ale#completion#OmniFunc(findstart, base) abort
|
|||||||
let b:ale_completion_result = ale#completion#FilterSuggestionsByPrefix(
|
let b:ale_completion_result = ale#completion#FilterSuggestionsByPrefix(
|
||||||
\ function(l:parser)(l:response),
|
\ function(l:parser)(l:response),
|
||||||
\ l:prefix
|
\ l:prefix
|
||||||
\)
|
\)[: g:ale_completion_max_suggestions]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return get(b:, 'ale_completion_result', [])
|
return get(b:, 'ale_completion_result', [])
|
||||||
@ -132,7 +132,7 @@ endfunction
|
|||||||
function! ale#completion#ParseTSServerCompletions(response) abort
|
function! ale#completion#ParseTSServerCompletions(response) abort
|
||||||
let l:names = []
|
let l:names = []
|
||||||
|
|
||||||
for l:suggestion in a:response.body[: g:ale_completion_max_suggestions]
|
for l:suggestion in a:response.body
|
||||||
call add(l:names, l:suggestion.name)
|
call add(l:names, l:suggestion.name)
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user