diff options
author | jhlink <jhlink@users.noreply.github.com> | 2020-07-10 17:46:01 -0400 |
---|---|---|
committer | jhlink <jhlink@users.noreply.github.com> | 2020-07-10 17:46:01 -0400 |
commit | 7f881f66a845ed8f056e5246e7cbbfc2e95bea07 (patch) | |
tree | 4fec33d748a4962a7c1b07ac185e454a3143608b /autoload | |
parent | 106c27644b4ff7543d600ae54ab9c53bec909828 (diff) | |
download | ale-7f881f66a845ed8f056e5246e7cbbfc2e95bea07.zip |
feat: Add ALE fixer for astyle
Diffstat (limited to 'autoload')
-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 |