mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-28 12:32:27 +08:00
feat: Add ALE fixer for astyle
This commit is contained in:
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
|
||||||
Reference in New Issue
Block a user