From e4738a4f5269a973d7ba98d6ab93efad0c7afc63 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Thu, 3 Jun 2021 22:23:21 -0700 Subject: [PATCH] neovim: CoC --- default.conf.yaml | 1 + neovim/coc-settings.json | 1 + neovim/coc/extensions/.gitignore | 2 ++ neovim/coc/extensions/db.json | 1 + neovim/coc/extensions/package.json | 5 +++++ neovim/coc/memos.json | 1 + neovim/init.vim | 1 + neovim/postinstall | 5 +++-- 8 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 neovim/coc-settings.json create mode 100644 neovim/coc/extensions/.gitignore create mode 100644 neovim/coc/extensions/db.json create mode 100644 neovim/coc/extensions/package.json create mode 100644 neovim/coc/memos.json diff --git a/default.conf.yaml b/default.conf.yaml index 2f956ca..85b14d7 100644 --- a/default.conf.yaml +++ b/default.conf.yaml @@ -10,6 +10,7 @@ - link: ~/bin: bin/ ~/.config/alacritty: alacritty/ + ~/.config/coc: neovim/coc ~/.config/direnv/direnvrc: direnv/direnvrc ~/.config/flake8: etc/flake8 ~/.config/git: git/ diff --git a/neovim/coc-settings.json b/neovim/coc-settings.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/neovim/coc-settings.json @@ -0,0 +1 @@ +{} diff --git a/neovim/coc/extensions/.gitignore b/neovim/coc/extensions/.gitignore new file mode 100644 index 0000000..4f5b9f9 --- /dev/null +++ b/neovim/coc/extensions/.gitignore @@ -0,0 +1,2 @@ +/coc-rust-analyzer-data +/package-lock.json diff --git a/neovim/coc/extensions/db.json b/neovim/coc/extensions/db.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/neovim/coc/extensions/db.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/neovim/coc/extensions/package.json b/neovim/coc/extensions/package.json new file mode 100644 index 0000000..b9a923d --- /dev/null +++ b/neovim/coc/extensions/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "coc-rust-analyzer": ">=0.46.0" + } +} \ No newline at end of file diff --git a/neovim/coc/memos.json b/neovim/coc/memos.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/neovim/coc/memos.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/neovim/init.vim b/neovim/init.vim index d012eb2..458eb74 100644 --- a/neovim/init.vim +++ b/neovim/init.vim @@ -33,6 +33,7 @@ Plug 'LnL7/vim-nix' Plug 'ludovicchabant/vim-gutentags' Plug 'MarcWeber/vim-addon-local-vimrc' Plug 'mxw/vim-jsx' +Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'ntpeters/vim-better-whitespace' Plug 'pangloss/vim-javascript' Plug 'plasticboy/vim-markdown' diff --git a/neovim/postinstall b/neovim/postinstall index f4d824b..89cd35e 100755 --- a/neovim/postinstall +++ b/neovim/postinstall @@ -1,10 +1,11 @@ #!/usr/bin/env bash -set -euo pipefail -set -x +set -exuo pipefail [ -d ~/.virtualenvs/neovim3 ] || python3 -m venv ~/.virtualenvs/neovim3 ~/.virtualenvs/neovim3/bin/python -c 'import pynvim' || ~/.virtualenvs/neovim3/bin/pip install pynvim +(cd ~/.config/coc/extensions && npm install) + # https://github.com/junegunn/vim-plug/wiki/tips#install-plugins-on-the-command-line nvim -es -u ~/.config/nvim/init.vim -i NONE -c "PlugInstall" -c "qa"