e149692cc9
subrepo: subdir: "dotfiles/.vim/plugged/ale" merged: "e4b205440" upstream: origin: "https://github.com/dense-analysis/ale.git" branch: "master" commit: "e4b205440" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
15 lines
434 B
VimL
15 lines
434 B
VimL
" Author: neersighted <bjorn@neersighted.com>
|
|
" 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',
|
|
\})
|