Coc.nvim: Some plugin change completeopt on insert mode (but I have no plugin except for coc.nvim itself)

Created on 19 Feb 2020  Â·  12Comments  Â·  Source: neoclide/coc.nvim

Result from CocInfo

## versions

vim version: VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 19 2020 21:05:46)
node version: v12.2.0
coc.nvim version: 0.0.74-d57f450e8d
term: dumb
platform: linux

## Messages
Messages maintainer: Bram Moolenaar <[email protected]>

Error detected while processing function <SNR>2_lod_cmd:
line    3:
E580: :endif without :if:  endif


"mmpayinvoicecomm/nonpay_quota/nonpay_quota.cpp" 304L, 13507C
match 1 of 12
match 1 of 6
Pattern not found
[coc.nvim] error: Some plugin change completeopt on insert mode!
[coc.nvim] error: Some plugin change completeopt on insert mode!
## Output channel: snippets

Describe the bug

C++ autocomplete keeps saying "Some plugin change completeopt on insert mode!", but I tried removing all my plugins and the problem remains.

Reproduce the bug

  • Create file mini.vim with:

    call plug#begin()
    Plug 'neoclide/coc.nvim', {'branch': 'release'}
    call plug#end()
    
    set nocompatible
    set hidden
    set nobackup
    set nowritebackup
    set cmdheight=2
    set updatetime=300
    set shortmess+=c
    set signcolumn=yes
    
  • Start (neo)vim with command: vim -u example.cpp

  • Operate vim.

Screenshots (optional)

If applicable, add screenshots to help explain your problem.
image

Most helpful comment

deoplete was interfering for me.

All 12 comments

Check by :verbose set completeopt?, this will shows who changes completeopt.
`

Check by :verbose set completeopt?, this will shows who changes completeopt.
`

image

Well, looks like it was set by coc itself

You should try vim -u mini.vim example.cpp

You should try vim -u mini.vim example.cpp

Yes I tried it.

:verbose set completeopt? firstly only showed completeopt=preview,menuone when I just opened the file. If I wrote a variable and hit ., the "some plugin" tip would show up, then :verbose set completeopt? would show an extra line saying Last set from ~/.vim/pack/coc/start/coc.nvim-release/autoload/coc/api.vim line 110.

BTW, :: behaved well, but . and -> would always shows the tip.

BTW, :: behaved well, but . and -> would always shows the tip.

Are you getting c++ server completion? If yes, you're not showing your real configuration, and your mini.vim isn't corresponding.

We can't reproduce this, as there's no indication from your report including anything in special that would cause this, and no one else have hit it.

Try disable coc.nvim and check out :verbose set completeopt? after insert some text.

Try disable coc.nvim and check out :verbose set completeopt? after insert some text.

image

Maybe I loaded coc twice?

And if I rename pack directory, vim would show:
image

If I also moved omni out of autoload, it'll show: completeopt=menu,preview

Ah I see. I installed omnicppcomplete long time ago, and it interferes with other plugins. I deleted related files and it worked like a charm!

What I still don't understand: https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim

Do I have to use vim-plug and Automation script (use pack) simultaneously?

All you need is checkout release branch and add it to rtp of vim.

deoplete was interfering for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andys8 picture andys8  Â·  3Comments

iago-lito picture iago-lito  Â·  3Comments

svenstaro picture svenstaro  Â·  4Comments

rkulla picture rkulla  Â·  3Comments

lanox picture lanox  Â·  3Comments