summaryrefslogtreecommitdiff
path: root/autoload/ale/fixers/gofumpt.vim
blob: 9975320918ba6da564bb77d4b55241fb70734c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
" Author: David Houston <houstdav000>
" Description: A stricter gofmt implementation.

call ale#Set('go_gofumpt_executable', 'gofumpt')
call ale#Set('go_gofumpt_options', '')

function! ale#fixers#gofumpt#Fix(buffer) abort
    let l:executable = ale#Var(a:buffer, 'go_gofumpt_executable')
    let l:options = ale#Var(a:buffer, 'go_gofumpt_options')

    return {
    \   'command': ale#Escape(l:executable)
    \       . ale#Pad(l:options)
    \       . ' -w -- %t',
    \   'read_temporary_file': 1,
    \}
endfunction