mirror of
https://github.com/dense-analysis/ale
synced 2024-12-22 14:13:12 +00:00
feat: Add ALE fixer for astyle
This commit is contained in:
parent
106c27644b
commit
7f881f66a8
14
autoload/ale/fixers/astyle.vim
Normal file
14
autoload/ale/fixers/astyle.vim
Normal file
@ -0,0 +1,14 @@
|
||||
" Author: James Kim <jhlink@users.noreply.github.com>
|
||||
" Description: Fix C/C++ files with astyle.
|
||||
|
||||
call ale#Set('c_astyle_executable', 'astyle')
|
||||
|
||||
function! ale#fixers#astyle#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'c_astyle_executable')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable)
|
||||
\ . ' %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
Loading…
Reference in New Issue
Block a user