Closed fatso83 closed 5 years ago
CocInstall
is imperative not declarative. You use it once and coc auto updates for you. The declarative equivalent is:
https://github.com/neoclide/coc.nvim/blob/4fee42c30c03d51b8cb213b9651ea996b4d842a9/doc/coc.txt#L756
Well, this issue still holds, I guess. Add this to the docs as a suggestion on how to declaratively install extensions. This is typical if you share a setup between different computers through dotfiles :
let g:coc_global_extensions = ['coc-tsserver','coc-json']
I can supply a PR?
It's in the docs see above doc/coc.txt
.
Run help coc
There's a difference between "it's available" and "this is how to use it". I'd bet that half the people with their own dotfiles repo don't really know how Vim configures its shit, but know that "if I put this line in here it works". But well, this issue at least serves as documentation for that, so Mission Accomplished, I guess :man_shrugging:
Just to serve the documentation purpose and to add extra Google keywords: this is how I handled Coc plugins installation in my NixOS / Nix setup which favors declarative functional approach instead of imperative.
Another way is use some shell script which mentioned in wiki. It would be easier if we can provide GUI like other editor, but we can't.
Describe the solution you'd like It currently says we should install extensions like this:
:CocInstall coc-tsserver
. I can't put this in a.vimrc
file, as each install slows down the startup. I'd like the docs to provide an example of conditionally loading extensions (or better, make the check to see if an extension is installed take less than the 1-2 secs it currently does).Describe alternatives you've considered
(or something - don't know vimscript)