diff options
Diffstat (limited to 'ale_linters/go/gofmt.vim')
-rw-r--r-- | ale_linters/go/gofmt.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ale_linters/go/gofmt.vim b/ale_linters/go/gofmt.vim index 337deef8..a233b422 100644 --- a/ale_linters/go/gofmt.vim +++ b/ale_linters/go/gofmt.vim @@ -1,10 +1,16 @@ " 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': 'gofmt -e %t', +\ 'command': function('ale_linters#go#gofmt#GetCommand'), \ 'callback': 'ale#handlers#unix#HandleAsError', \}) |