m-ou-se / config

The one and only perfect configuration for Vim, Zsh, Bash, Git, etc.
41 stars 9 forks source link

Switch from YouCompleteMe to CoC #13

Open m-ou-se opened 4 years ago

m-ou-se commented 4 years ago

CoC seems to be working a lot better than YouCompleteMe. The coc branch of this repo uses that, and has been working pretty well.

Few issues left to solve:

Minnozz commented 4 years ago

Re CocInstall: this is because the install commands are executed asynchronously and vim exits immediately after they are started.

m-ou-se commented 4 years ago

Using CocInstall -sync now. But that's pretty slow, every time.

Looks like it is also possible to use minpac (or any other vim package manager) to install CoC extensions, instead of CoC itself. Should we be doing that instead? (cc @de-vri-es)

de-vri-es commented 4 years ago

coc and ultisnips worked fine together for me. Did you install coc-ultisnips?

Looks like it is also possible to use minpac (or any other vim package manager) to install CoC extensions, instead of CoC itself. Should we be doing that instead? (cc @de-vri-es)

That does sound better. One package manager for vim stuff sounds like plenty.

de-vri-es commented 4 years ago

coc and ultisnips worked fine together for me. Did you install coc-ultisnips?

Note that when I first tried coc, I just installed a bunch of coc modules from the command line. I'm not sure if that included coc-ultisnips, but it could have.

Minnozz commented 4 years ago

I tried using a package manager (vim-pack) to install the coc extensions, but this means that you have to build each extension yourself.

I switched to using CocInstall, but I discovered that you can pass multiple extensions to that command, which might help a bit.

Minnozz commented 4 years ago

Tip: g:coc_global_extensions

de-vri-es commented 4 years ago

I tried g:coc_global_extensions, but it causes a new vim instance to open a split and perform the install if any extension in missing. I don't really like that, since it makes scripting vim from the command line even more unpredictable and error prone.

It's also not very nice when using vim as manpager, though maybe we should see if we can disable coc there anyway :eyes:

Passing multiple extensions to CocInstall is a nice improvement though. I also delayed the command with autocmd vimenter now, which allows it to show progress. It doesn't update very smoothly, but it's better than just an empty screen :)