diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-29 23:45:15 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-29 23:45:15 +0900 |
commit | bc5b624da72f4a6843dbf05c4b04c9f5716c7cae (patch) | |
tree | 56f1b3bd0f9d92ef8803ec8e4a0322b07f792bb3 | |
parent | 085fc82ade226146a15acd2145453093d8373051 (diff) | |
download | vim-lsp-settings-bc5b624da72f4a6843dbf05c4b04c9f5716c7cae.tar.gz vim-lsp-settings-bc5b624da72f4a6843dbf05c4b04c9f5716c7cae.tar.bz2 vim-lsp-settings-bc5b624da72f4a6843dbf05c4b04c9f5716c7cae.zip |
Remove duplicate candidate in command completion
-rw-r--r-- | autoload/lsp_settings.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim index 536d993..08bc138 100644 --- a/autoload/lsp_settings.vim +++ b/autoload/lsp_settings.vim @@ -114,7 +114,7 @@ function! lsp_settings#complete_uninstall(arglead, cmdline, cursorpos) abort call add(l:installers, l:conf.command) endfor endfor - return filter(l:installers, 'stridx(v:val, a:arglead) == 0') + return filter(uniq(l:installers), 'stridx(v:val, a:arglead) == 0') endfunction function! lsp_settings#complete_install(arglead, cmdline, cursorpos) abort @@ -151,5 +151,5 @@ function! lsp_settings#complete_install(arglead, cmdline, cursorpos) abort call add(l:installers, l:conf.command) endif endfor - return filter(l:installers, 'stridx(v:val, a:arglead) == 0') + return filter(uniq(l:installers), 'stridx(v:val, a:arglead) == 0') endfunction |