diff options
Diffstat (limited to 'autoload/ale/fixers/dhall_format.vim')
-rw-r--r-- | autoload/ale/fixers/dhall_format.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/autoload/ale/fixers/dhall_format.vim b/autoload/ale/fixers/dhall_format.vim new file mode 100644 index 00000000..d4021983 --- /dev/null +++ b/autoload/ale/fixers/dhall_format.vim @@ -0,0 +1,14 @@ +" Author: toastal <toastal@protonmail.com> +" Description: Dhall’s built-in formatter +" +function! ale#fixers#dhall_format#Fix(buffer) abort + let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer) + let l:command = l:executable + \ . ' format' + \ . ' --inplace %t' + + return { + \ 'command': l:command, + \ 'read_temporary_file': 1, + \} +endfunction |