Skip to content

Commit 1573786

Browse files
committed
Pass - for stdin
1 parent f7aea5c commit 1573786

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

autoload/codefmt/ktfmt.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ function! codefmt#ktfmt#GetFormatter() abort
4848
function l:formatter.FormatRange(startline, endline) abort
4949
" Split the command on spaces, except when there's a proceeding \
5050
let l:cmd = split(s:plugin.Flag('ktfmt_executable'), '\\\@<! ')
51+
" ktfmt requires '-' as a filename arg to read stdin
52+
let l:cmd = add(l:cmd, '-')
5153
try
5254
" TODO(tstone) Switch to using --lines once that arg is added, see
5355
" https://github.com/facebookincubator/ktfmt/issues/218

0 commit comments

Comments
 (0)