Skip to content

Commit

Permalink
fix: command-line completion of LspInstallServer
Browse files Browse the repository at this point in the history
In cmdwin, LspInstallServer's completion always returns LSP(s) for Vim
script regardless of the current buffer's filetype.
  • Loading branch information
mityu authored and mattn committed Dec 16, 2024
1 parent a00edd2 commit 2d396a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/lsp_settings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ endfunction
function! lsp_settings#complete_install(arglead, cmdline, cursorpos) abort
let l:installers = []

for l:ft in split(&filetype . '.', '\.', 1)
let l:filetype = getcmdwintype() !=# '' && getcmdtype() ==# '' ? getbufvar('#', '&filetype') : &filetype
for l:ft in split(l:filetype . '.', '\.', 1)
let l:ft = tolower(empty(l:ft) ? '_' : l:ft)
if !has_key(s:settings, l:ft)
continue
Expand Down

0 comments on commit 2d396a4

Please sign in to comment.