cmp-cmdline icon indicating copy to clipboard operation
cmp-cmdline copied to clipboard

[Bug]: can't complete user defined command

Open younger-1 opened this issue 3 years ago • 6 comments

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>)

younger-1 avatar Dec 10 '21 14:12 younger-1

You should update neovim.

hrsh7th avatar Dec 10 '21 15:12 hrsh7th

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 avatar Dec 11 '21 07:12 younger-1

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

younger-1 avatar Dec 11 '21 17:12 younger-1

I think this problem was fixed on latest main.

hrsh7th avatar Feb 13 '22 12:02 hrsh7th

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

younger-1 avatar Feb 17 '22 13:02 younger-1

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>

tracyone avatar Sep 22 '23 07:09 tracyone