We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1573786 commit 16909d9Copy full SHA for 16909d9
autoload/codefmt/ktfmt.vim
@@ -28,10 +28,13 @@ function! codefmt#ktfmt#GetFormatter() abort
28
\ 'in your .vimrc' }
29
30
function l:formatter.IsAvailable() abort
31
- let l:exec = s:plugin.Flag('ktfmt_executable')
32
- if executable(l:exec)
+ let l:exec = split(s:plugin.Flag('ktfmt_executable'), '\\\@<! ')
+ if empty(l:exec)
33
+ return 0
34
+ endif
35
+ if executable(l:exec[0])
36
return 1
- elseif !empty(l:exec) && l:exec isnot# 'ktfmt'
37
+ elseif !empty(l:exec[0]) && l:exec[0] isnot# 'ktfmt'
38
" The user has specified a custom formatter command. Hope it works.
39
40
else
0 commit comments