Coc.nvim: Run `:CocInstall <something>` non-interactively in command line interface

Created on 18 Feb 2019  路  9Comments  路  Source: neoclide/coc.nvim

It would be great if CocInstall command works in CLI with +qall.

In case of vim-plug, nvim +'PlugInstall' +qall in command line would install all of plugins specified in init.vim and quit neovim after done. There is no need to interact with neovim.

nvim +'CocInstall coc-json' +qall should work as above. Install coc-json and quit neovim.
However nvim +'CocInstall coc-json' +qall seems that neovim quit before install is done.

Though nvim +'CocInstall coc-json' works as expected but vim should be closed manually with :q which is not preferable in automated script.

Most helpful comment

@aswin-raghavan can't reproduce, you have to provide the way to reproduce instead just complain.

nvim +'CocInstall -sync coc-json' +qall

nvim +CocUpdateSync +qall

should works, you could have network issue, so make sure checkout the log.

It's also documented in wiki https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions, if you can't read, consider not use it at all to avoid waste of your time.

All 9 comments

But you don't need to run CocInstall in that way, you can run the command and continue your work, the extension would be loaded and activated when necessary after installed.

Checkout https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim#automation-script for automation setup script.

You can use nvim +CocUpdateSync +qall to update extensions.

That's fair enough but nvim +'CocInstall coc-json' +qall should work just like nvim +CocUpdateSync +qall, I suppose.
If its not for you, that's ok. https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim#automation-script is totally fine for me.

This is still an issue. Can we please open it again? There seems to be no solution and simply dismissed the issue

@aswin-raghavan can't reproduce, you have to provide the way to reproduce instead just complain.

nvim +'CocInstall -sync coc-json' +qall

nvim +CocUpdateSync +qall

should works, you could have network issue, so make sure checkout the log.

It's also documented in wiki https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions, if you can't read, consider not use it at all to avoid waste of your time.

I'm glad this feature has been added. Many thanks

It does not work for me. As in, it works without qall and does not work when +qall is added.
What I mean by works: By checking :CocList extensions before and after running the command from command line.

  1. nvim +'CocInstall -sync coc-svg' +qall
  2. nvim +'CocUpdateSync +qall
  3. nvim +'CocList extensions'
    ... does not show coc-svg, shows many other extensions that were installed manually ...

There is a brief flash of an error when I run nvim +'CocInstall -sync coc-svg' +qall which reads

Error on request (installExtensions): Vim(return):Error invoking 'installExtensions' on channel 3 (coc): fn(...).finally is not a function

I am on nvim inside a custom docker so it is a bit hard to give a simple reproduce script

Ubuntu 18.04
:checkhealth is ok
node version is v8.10.0
npm version is 3.5.2
nvim installed from nvim-stable PPA version:
```NVIM v0.4.3
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-U5Ub0w/neovim-0.4.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-U5Ub0w/neovim-0.4.3/build/config -I/build/neovim-U5Ub0w/neovim-0.4.3/src -I/usr/include -I/usr/include/lua5.1 -I/build/neovim-U5Ub0w/neovim-0.4.3/build/src/nvim/auto -I/build/neovim-U5Ub0w/neovim-0.4.3/build/include
Compiled by [email protected]

Features: +acl +iconv +tui```

node version is v8.10.0

It's bug that we use Promise.finally which doesn't exists on node v8, will be fixed soon and we will drop support for node v8 in near future.

Does upgrading node solve the problem currently?
Can we open this issue (or) open a new issue for this bug?

Can we open this issue (or) open a new issue for this bug?

It's fixed, if you still have problem, please create a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tom-james-watson picture tom-james-watson  路  3Comments

czepluch picture czepluch  路  3Comments

andys8 picture andys8  路  3Comments

hackingcat picture hackingcat  路  3Comments

chemzqm picture chemzqm  路  3Comments