From 83a55aa3a7b5d52c3a6121f784b29257cdcfa900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 8 Jun 2019 12:10:54 +0100 Subject: [PATCH] Use go via coc --- .vim/coc-settings.json | 11 +++++++++++ .vimrc.plugins | 1 - common/up.sh | 21 +++++++++++---------- 3 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 .vim/coc-settings.json diff --git a/.vim/coc-settings.json b/.vim/coc-settings.json new file mode 100644 index 00000000..bee66df1 --- /dev/null +++ b/.vim/coc-settings.json @@ -0,0 +1,11 @@ +{ + "languageserver": { + "golang": { + "command": "gopls", + "args": [], + "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"], + "filetypes": ["go"] + } + } +} + diff --git a/.vimrc.plugins b/.vimrc.plugins index 96b25bc0..316923f5 100644 --- a/.vimrc.plugins +++ b/.vimrc.plugins @@ -12,7 +12,6 @@ Plug 'cespare/vim-toml' Plug 'Chiel92/vim-autoformat' Plug 'drmingdrmer/vim-toggle-quickfix' Plug 'editorconfig/editorconfig-vim' -Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'godlygeek/tabular' Plug 'https://github.com/cyplo/vim-colors-solarized.git' Plug 'jremmen/vim-ripgrep' diff --git a/common/up.sh b/common/up.sh index 3a8857d7..073e36ce 100755 --- a/common/up.sh +++ b/common/up.sh @@ -188,6 +188,16 @@ if [[ -z $NORUBY ]]; then rvm install ruby --disable-binary fi +if [[ -z $NO_GO ]]; then + GOPATH="$HOME/go" + export GOPATH=`realpath "$GOPATH"` + mkdir -p "$GOPATH" + + # excercism + go get -u -t github.com/exercism/cli/exercism + go get -u -t golang.org/x/tools/cmd/gopls +fi + if [[ -z $NOVIM ]]; then if [[ ! -d ~/.fzf ]]; then git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf @@ -206,16 +216,8 @@ if [[ -z $NOVIM ]]; then vim +PlugClean! +qa fi -if [[ -z $NO_GO ]]; then - GOPATH="$HOME/go" - export GOPATH=`realpath "$GOPATH"` - mkdir -p "$GOPATH" - - # excercism - go get -u github.com/exercism/cli/exercism -fi - nvm use node +npx npm install -g yarn npx npm install -g reveal-md npx npm install -g diff-so-fancy npx npm install -g cssnano @@ -224,4 +226,3 @@ echo echo "now go ahead and restart" echo -