-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoc.sh
executable file
·33 lines (28 loc) · 1.05 KB
/
coc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
set -o nounset # error when referencing undefined variable
set -o errexit # exit when command fails
# Install latest nodejs
if [ ! -x "$(command -v node)" ]; then
curl --fail -LSs https://install-node.now.sh/latest | sh
export PATH="/usr/local/bin/:$PATH"
# Or use package manager, e.g.
# sudo apt-get install nodejs
fi
# Use package feature to install coc.nvim
# for vim8
mkdir -p ~/.vim/pack/coc/start
cd ~/.vim/pack/coc/start
curl --fail -L https://github.com/neoclide/coc.nvim/archive/release.tar.gz | tar xzfv -
# for neovim
# mkdir -p ~/.local/share/nvim/site/pack/coc/start
# cd ~/.local/share/nvim/site/pack/coc/start
# curl --fail -L https://github.com/neoclide/coc.nvim/archive/release.tar.gz | tar xzfv -
# Install extensions
mkdir -p ~/.config/coc/extensions
cd ~/.config/coc/extensions
if [ ! -f package.json ]
then
echo '{"dependencies":{}}'> package.json
fi
# Change extension names to the extensions you need
npm install coc-snippets --global-style --ignore-scripts --no-bin-links --no-package-lock --only=prod