Allow duplicate LSP completions for autoimport (#3473)

Similarly to TS completions, this allows the user to pick the package to autoimport when both the package and method name are the same.
This commit is contained in:
Jerko Steiner
2021-01-31 17:21:31 +01:00
committed by GitHub
parent 7572ec3489
commit e8080be08b
2 changed files with 53 additions and 36 deletions

View File

@@ -614,6 +614,8 @@ function! ale#completion#ParseLSPCompletions(response) abort
\ 'kind': ale#completion#GetCompletionSymbols(get(l:item, 'kind', '')),
\ 'icase': 1,
\ 'menu': l:detail,
\ 'dup': get(l:info, 'additional_edits_only', 0)
\ || g:ale_completion_autoimport,
\ 'info': (type(l:doc) is v:t_string ? l:doc : ''),
\}
" This flag is used to tell if this completion came from ALE or not.