-
-
Notifications
You must be signed in to change notification settings - Fork 960
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
Installing extensions from a script #118
Comments
Yes, that's all you need to do, except that the location is different on windows.
Is's possible for a vim plugin to regist custom extension root, then you need to use a plugin manager to install that plugin, but none of current extensions is vim plugin right now. |
Cool, thanks! |
I wanted to run this in a docker build file, and I found a hack that worked: |
I found a good solution: |
None of the solutions above works in my case. I've defined Is there anything I'm missing to try? I wish I could do nvim --headless +CocInstall +qall But exits right away |
In the meantime this is doing the job for me: mkdir -p ~/.config/coc/extensions && cd ~/.config/coc/extensions
if [ ! -f package.json ]; then
echo '{"dependencies":{}}' >package.json
fi
COC_EXTENSIONS=$(nvim --headless -c 'echo coc_global_extensions' +qa 2>&1 | awk -v RS="'" '!(NR%2)')
npm install $(echo $COC_EXTENSIONS) --global-style --ignore-scripts --no-bin-links --no-package-lock --only=prod |
if
So And I prefer sed than awk: git clone --depth=1 https://github.com/Shougo/dein.vim \
~/.local/share/nvim/repos/github.com/Shougo/dein.vim &&
vi -c'call dein#update() | quit' &&
mkdir -p ~/.config/coc/extensions &&
echo '{"dependencies": {}}' >~/.config/coc/extensions/package.json &&
npm install -C ~/.config/coc/extensions \
$(vi --headless -c'echo g:coc_global_extensions | quit' 2>&1 | tail -n1 |
sed "s=\(', '\|\['\|']\)=\n=g") &&
mkdir -p ~/.config/coc/extensions/coc-gist-data &&
echo '{"token": "gho_"}' >~/.config/coc/extensions/coc-gist-data/secret.json # disable prompt works for me. |
Hi,
I'm using a script in my dotfiles to install neovim and all of the plugins I need.
How can I install a Coc extension in a script?
I tried several options:
The first one works but doesn't close nvim afterwards (so the install script can't run unattended),
the second one remains blank and the third exits immediately.
For reference to install vim-plug plugins I run:
If I just go to
~/.config/coc/extensions
and runyarn add $extensions
will that be enough? or does coc register the extensions somewhere else?Thanks for all the great work you're doing, I love this plugin! 👍
The text was updated successfully, but these errors were encountered: