Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions autoload/codefmt/prettier.vim
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ function! codefmt#prettier#GetFormatter() abort
\ 'prettier_executable') + ['--no-color']

" prettier is able to automatically choose the best parser if the filepath
" is provided. Otherwise, fall back to the previous default: babylon.
" is provided. Otherwise, fall back to the previous default: babel.
if @% == ""
call extend(l:cmd, ['--parser', 'babylon'])
call extend(l:cmd, ['--parser', 'babel'])
else
call extend(l:cmd, ['--stdin-filepath', expand('%:p')])
endif
Expand Down