diff options
author | cyy <cyyever@outlook.com> | 2019-08-25 22:14:53 +0800 |
---|---|---|
committer | cyy <cyyever@outlook.com> | 2020-10-31 14:01:08 +0800 |
commit | 983c7e880523de3b18e42f1405ba2d3ba6509960 (patch) | |
tree | bd248dc311db4a307135ef56b327b3fe1f5d3b39 /autoload/ale/fixers/fish_indent.vim | |
parent | 557a1ed5da70cb443a8650766f4e8ea95e8c0da3 (diff) | |
download | ale-983c7e880523de3b18e42f1405ba2d3ba6509960.zip |
add fish_indent fixer
Diffstat (limited to 'autoload/ale/fixers/fish_indent.vim')
-rw-r--r-- | autoload/ale/fixers/fish_indent.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/autoload/ale/fixers/fish_indent.vim b/autoload/ale/fixers/fish_indent.vim new file mode 100644 index 00000000..215a14ec --- /dev/null +++ b/autoload/ale/fixers/fish_indent.vim @@ -0,0 +1,19 @@ +" Author: Chen YuanYuan <cyyever@outlook.com> +" Description: Integration of fish_indent with ALE. + +call ale#Set('fish_indent_executable', 'fish_indent') +call ale#Set('fish_indent_options', '') + +function! ale#fixers#fish_indent#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'fish_indent_executable') + let l:options = ale#Var(a:buffer, 'fish_indent_options') + let l:filename = ale#Escape(bufname(a:buffer)) + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -w ' + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction |