Use go via coc

This commit is contained in:
Cyryl Płotnicki 2019-06-08 12:10:54 +01:00
parent 2370ab7c1f
commit 83a55aa3a7
3 changed files with 22 additions and 11 deletions

11
.vim/coc-settings.json Normal file
View file

@ -0,0 +1,11 @@
{
"languageserver": {
"golang": {
"command": "gopls",
"args": [],
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
"filetypes": ["go"]
}
}
}

View file

@ -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'

View file

@ -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