diff --git a/Makefile b/Makefile index 00719a7..821b9ff 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ alacritty: vim: echo "sudo pacman -S npm ctags; mkdir ~/.npm-global; npm config set prefix '~/.npm-global'; npm install -g pyright" + echo "go install golang.org/x/tools/gopls@latest" echo "set editing-mode vi" >> ~/.inputrc test -d ~/.vim || \ ln -s $(PWD)/sub/vim ~/.vim diff --git a/sub/bash/export b/sub/bash/export index 4ebbc60..a71b7ae 100644 --- a/sub/bash/export +++ b/sub/bash/export @@ -28,3 +28,7 @@ fi if [ -d "$HOME/.go" ] ; then export GOPATH="$HOME/.go" fi + +if [ -d "$HOME/.go/bin" ] ; then + export PATH="$PATH:$HOME/.go/bin" +fi diff --git a/sub/vim/vimrc b/sub/vim/vimrc index 3cf06cb..4ede935 100644 --- a/sub/vim/vimrc +++ b/sub/vim/vimrc @@ -103,6 +103,10 @@ call vundle#begin() Plugin 'powerman/vim-plugin-ruscmd' " Russian navigation + " golang + Plugin 'fatih/vim-go' + + call vundle#end() filetype plugin indent on @@ -164,6 +168,9 @@ let g:multi_cursor_skip_key = '' let g:multi_cursor_quit_key = '' +" golang +let g:go_def_mode='gopls' +let g:go_info_mode='gopls' au FileType py,go,c,cpp,objc,js call rainbow#load()