blob: 9326f482c854e05a0eae74b1e12052be09f00dfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
" Author Pig Frown <pigfrown@protonmail.com>
" Description: Fix Go files long lines with golines"
call ale#Set('go_golines_executable', 'golines')
call ale#Set('go_golines_options', '')
function! ale#fixers#golines#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'go_golines_executable')
let l:options = ale#Var(a:buffer, 'go_golines_options')
let l:env = ale#go#EnvString(a:buffer)
if !executable(l:executable)
return 0
endif
return {
\ 'command': l:env . ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options)
\}
endfunction
|