Skip to content

Commit 8e54240

Browse files
committed
fix(js-beautify): Use correct type for json filetype.
Fixes #95.
1 parent 3dad76a commit 8e54240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/codefmt/jsbeautify.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function! codefmt#jsbeautify#GetFormatter() abort
4141
" @throws ShellError
4242
function l:formatter.FormatRange(startline, endline) abort
4343
let l:cmd = [s:plugin.Flag('js_beautify_executable'), '-f', '-']
44-
if &filetype is# 'javascript'
44+
if &filetype is# 'javascript' || &filetype is# 'json'
4545
let l:cmd = l:cmd + ['--type', 'js']
4646
elseif &filetype != ""
4747
let l:cmd = l:cmd + ['--type', &filetype]

0 commit comments

Comments
 (0)