X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/ale_linters/go/gofmt.vim diff --git a/.vim/bundle/ale/ale_linters/go/gofmt.vim b/.vim/bundle/ale/ale_linters/go/gofmt.vim new file mode 100644 index 00000000..b313f9ca --- /dev/null +++ b/.vim/bundle/ale/ale_linters/go/gofmt.vim @@ -0,0 +1,15 @@ +" Author: neersighted +" Description: gofmt for Go files + +function! ale_linters#go#gofmt#GetCommand(buffer) abort + return ale#go#EnvString(a:buffer) + \ . '%e -e %t' +endfunction + +call ale#linter#Define('go', { +\ 'name': 'gofmt', +\ 'output_stream': 'stderr', +\ 'executable': 'gofmt', +\ 'command': function('ale_linters#go#gofmt#GetCommand'), +\ 'callback': 'ale#handlers#unix#HandleAsError', +\})