From d998060bea897a0cccd7c91d5a9810f60b9ecf03 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Wed, 26 Apr 2017 12:13:01 -0700 Subject: [PATCH] Go linting on write --- dotfiles/config/nvim/init.vim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dotfiles/config/nvim/init.vim b/dotfiles/config/nvim/init.vim index e561d9f..50a278b 100644 --- a/dotfiles/config/nvim/init.vim +++ b/dotfiles/config/nvim/init.vim @@ -151,10 +151,6 @@ let g:rust_recommended_style=0 " Explicitly provide vim-go the gofmt command let g:go_fmt_command = "gofmt" -" Go linting and automatically lint on write -set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim -autocmd BufWritePost,FileWritePost *.go execute 'Lint' | cwindow - " Hotkeys " Note noremap is a normal mode non-recursive mapping " nnoremap and nmap make the bind only work in normal mode @@ -202,6 +198,9 @@ endif let g:syntastic_javascript_checkers = ['eslint'] let g:syntastic_javascript_jsxhint_exec = 'eslint' +" Go linting on write. This takes advantage of :GoMetaLinter in vim-go and requires golint to be installed +autocmd BufWritePost,FileWritePost *.go execute 'GoMetalLinter' | cwindow + " Color customizations colorscheme zenburn