7 mkdir -p "$HOME/.vim/pack/plugins/start"
8 rm -rf "$HOME/.vim/pack/plugins/start/vim-go"
9 git clone --depth=1 https://github.com/fatih/vim-go.git "$HOME/.vim/pack/plugins/start/vim-go"
11 # Install go linting tools
12 echo "Building go language tools..."
14 go get golang.org/x/tools/gopls > /dev/null #2>/dev/null
16 go get golang.org/x/lint/golint > /dev/null #2>/dev/null
18 go get github.com/kisielk/errcheck > /dev/null #2>/dev/null
20 go get golang.org/x/tools/cmd/goimports > /dev/null #2>/dev/null
22 go get github.com/sqs/goreturns > /dev/null #2>/dev/null
24 if [ -f "$HOME/.vimrc" ]; then
26 if ! grep 'source.*go.vim' -r ~/.vimrc; then
27 mkdir -p ~/.vim/plugin
28 printf '\n" Golang: reasonable defaults from webinstall.dev/vim-go\n' >> ~/.vimrc
29 printf 'source ~/.vim/plugin/go.vim\n' >> ~/.vimrc
34 if ! [ -f "$HOME/.vim/plugin/go.vim" ]; then
35 mkdir -p ~/.vim/plugin
36 WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
37 curl -fsS -o ~/.vim/plugin/go.vim "$WEBI_HOST/packages/vim-go/go.vim"