Files
ale/autoload/ale/fixers/vfmt.vim
fiatjaf 655f0070cd Add support for V: "v" (compiler) and "vfmt" fixer. (#3622)
* v: add "v fmt" fixer.

* v: add "v" (build) linter.

* v: fix vlint complaints and add documentation.

* v: add tests.

* v: use ale#Pad().
2021-03-26 15:38:57 +09:00

14 lines
388 B
VimL

" Author: fiatjaf <fiatjaf@alhur.es>
" Description: Integration of `v fmt` with ALE.
call ale#Set('v_vfmt_options', '')
function! ale#fixers#vfmt#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'v_v_executable')
let l:options = ale#Var(a:buffer, 'v_vfmt_options')
return {
\ 'command': ale#Escape(l:executable) . ' fmt' . ale#Pad(l:options)
\}
endfunction