Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error detected while processing coc.vim -> -complete used without -nargs #3215

Closed
Whitecx opened this issue Jul 13, 2021 · 3 comments
Closed

Comments

@Whitecx
Copy link

Whitecx commented Jul 13, 2021

Describe the bug

My vim version 8.2.3150 give the following warning with coc.vim installed
Error detected while processing .vim/plugged/coc.nvim/plugin/coc.vim: line 484: E1208: -complete used without -nargsPress ENTER or type command to continue

Looking at the repo for coc.vim, the existing codebase matches what I have locally. Specifically, this line is the offender

command! -nargs=0 -complete=custom,coc#list#names CocListCancel   :call coc#rpc#notify('listCancel', [])

Looking at the Vimscript docs, I see that the following attribute is included to allow for autocompletion for arguments:

-complete=custom,{func} custom completion, defined via {func}

However, line 484 of the plugin specifies 0 arguments, which makes the line seem unnecessary and is probably causing the warning. Should -complete-custom be removed?

Reproduce the bug

.vimrc:

  2 set laststatus=2
  3 set noshowmode
  4 set tabstop=4
  5 set hlsearch
  6 set nocompatible              " required
  7 filetype off                  " required
  8 
  9 call plug#begin('~/.vim/plugged')
 10 
 11 Plug 'neoclide/coc.nvim', {'branch': 'release'}
 12 Plug 'preservim/nerdtree'
 13 call plug#end()
 14 
 15 " Enable folding
 16 set foldmethod=indent
 17 set foldlevel=99
 18 " Enable folding with the spacebar
 19 nnoremap <space> za
 20 
 21 let python_highlight_all=1
 22 syntax on

Steps: Open any file w/ vim (v. 8.2.3150)

@Whitecx
Copy link
Author

Whitecx commented Jul 13, 2021

Removing

-complete=custom,coc#list#names 

Got rid of the error and I don't see any bugs as a result so far. If someone confirms that this is the appropriate way to handle this, I could submit a quick PR for it.

@jenhsun
Copy link

jenhsun commented Jul 13, 2021

Just change .vim/plugged/coc.nvim/plugin/coc.vim line 484's -nargs=0 to -nargs=? and keep -complete=custom,coc#list#names solve the problem.

Fix from #3211 (comment)

@chemzqm
Copy link
Member

chemzqm commented Jul 15, 2021

Fixed on latest release branch of coc.nvim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants