Adds fixer for golines (#3862)

* Adds fixer for golines

* Repositions golines docs to be in alphabetical order

* Fixes golines doc tag

* Fixes formatting for golines docs
This commit is contained in:
pigfrown
2021-08-09 02:13:43 +01:00
committed by GitHub
parent d6f5fb69ad
commit 836125391a
7 changed files with 101 additions and 1 deletions
+21
View File
@@ -0,0 +1,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