1
0
Fork 0
mirror of synced 2024-05-24 11:10:31 -04:00
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/gofumpt.vim

18 lines
520 B
VimL
Raw Normal View History

2022-08-08 09:45:34 -04:00
" 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