diff options
author | w0rp <devw0rp@gmail.com> | 2019-11-14 14:50:16 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-11-14 14:50:21 +0000 |
commit | 9005a62dc2080327a0f2164d765f837e90e963dc (patch) | |
tree | 21b3704d4987e50a2e43958ff53a79e05cf8b4f3 /autoload | |
parent | 7665559d0e6102c9eccf39a119afd9c7a1a0af82 (diff) | |
download | ale-9005a62dc2080327a0f2164d765f837e90e963dc.zip |
Clean up the nimpretty code
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/fixers/nimpretty.vim | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/autoload/ale/fixers/nimpretty.vim b/autoload/ale/fixers/nimpretty.vim index be6df470..fe2e7136 100644 --- a/autoload/ale/fixers/nimpretty.vim +++ b/autoload/ale/fixers/nimpretty.vim @@ -3,19 +3,13 @@ call ale#Set('nim_nimpretty_executable', 'nimpretty') call ale#Set('nim_nimpretty_options', '--maxLineLen:80') -call ale#Set('nim_nimpretty_use_global', get(g:, 'ale_use_global_executables', 0)) - -function! ale#fixers#nimpretty#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'nim_nimpretty', ['nimpretty']) -endfunction function! ale#fixers#nimpretty#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'nim_nimpretty_executable') let l:options = ale#Var(a:buffer, 'nim_nimpretty_options') return { - \ 'command': ale#Escape(ale#fixers#nimpretty#GetExecutable(a:buffer)) - \ . ' %t' - \ . (empty(l:options) ? '' : ' ' . l:options), + \ 'command': ale#Escape(l:executable) . ' %t' . ale#Pad(l:options), \ 'read_temporary_file': 1, \} endfunction |