hrsh7th / cmp-cmdline

nvim-cmp source for vim's cmdline
MIT License
505 stars 41 forks source link

[Bug]: can't complete user defined command #22

Open younger-1 opened 2 years ago

younger-1 commented 2 years ago

When define a user command with -complete=command argument, cmp-cmdline can't even give a completion list.

For exxample with the following command, after input Redir in vim cmdline, <tab> do not give any further completion.

command! -nargs=1 -complete=command Redir call utils#CaptureCommandOutput(<q-args>)
hrsh7th commented 2 years ago

You should update neovim.

younger-1 commented 2 years ago

Sorry I didn't make it clear.

My neovim version: nvim --version

NVIM v0.6.0
Build type: Release
LuaJIT 2.0.5
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

I have tried in both ArchLinux and Windows, it didn't work in both platform.

younger-1 commented 2 years ago

@hrsh7th Should I use the head version of neovim 0.7?

hrsh7th commented 2 years ago

I think this problem was fixed on latest main.

younger-1 commented 2 years ago

For exxample with the following command, after input Redir in vim cmdline, <tab> do not give any further completion.

command! -nargs=1 -complete=command Redir call utils#CaptureCommandOutput(<q-args>)

It still counld not complete when defining user command with -complete=command argument I have update to latest commit: f4beb74 2022-02-13 Support modifiers / range / count Fix

tracyone commented 10 months ago

I think I met the same issue. cmp-cmdline change the keymapping of <tab> and broke the neovim's input()'s complete.

By default <tab> in cmdline is "No mapping found".

For now, the only way to restore tab function in cmdline is unmap

cunmap <tab>