diff options
-rw-r--r-- | autoload/ale/fixers/astyle.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/autoload/ale/fixers/astyle.vim b/autoload/ale/fixers/astyle.vim new file mode 100644 index 00000000..3ee48031 --- /dev/null +++ b/autoload/ale/fixers/astyle.vim @@ -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 |