3 homepage: https://github.com/fatih/vim-go
5 vim-go adds Go language support for Vim.
16 > `vim-go` provides integration with various official and 3rd part go tooling
17 > for linting, vetting, etc.
19 You'll also need `ALE`, `syntastic`, or similar.
21 ### How to install by hand
24 git clone --depth=1 https://github.com/fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go
27 ### How to configure your `.vimrc`
30 " don't check syntax immediately on open or on quit
31 let g:syntastic_check_on_open = 1
32 let g:syntastic_check_on_wq = 0
34 " we also want to get rid of accidental trailing whitespace on save
35 autocmd BufWritePre * :%s/\s\+$//e
39 """""""""""""""""""""""""""
40 " Golang-specific options "
41 """""""""""""""""""""""""""
43 " tell syntastic that go, golint, and errcheck are installed
44 let g:syntastic_go_checkers = ['go', 'golint', 'errcheck']
46 " tell vim-go that goimports is installed
47 let g:go_fmt_command = "goimports"
49 " tell vim-go to highlight
50 let g:go_highlight_functions = 1
51 let g:go_highlight_methods = 1
52 let g:go_highlight_structs = 1
53 let g:go_highlight_operators = 1
54 let g:go_highlight_build_constraints = 1
57 ### How to install go language tools
61 go get golang.org/x/tools/gopls
64 go get golang.org/x/lint/golint
67 go get github.com/kisielk/errcheck
70 go get github.com/jstemmer/gotags
73 go get golang.org/x/tools/cmd/goimports
76 go get golang.org/x/tools/cmd/gorename
79 go get golang.org/x/tools/cmd/gotype