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.
2 parents 8bae55b + 8e54240 commit 295acb2Copy full SHA for 295acb2
autoload/codefmt/jsbeautify.vim
@@ -41,7 +41,9 @@ function! codefmt#jsbeautify#GetFormatter() abort
41
" @throws ShellError
42
function l:formatter.FormatRange(startline, endline) abort
43
let l:cmd = [s:plugin.Flag('js_beautify_executable'), '-f', '-']
44
- if &filetype != ""
+ if &filetype is# 'javascript' || &filetype is# 'json'
45
+ let l:cmd = l:cmd + ['--type', 'js']
46
+ elseif &filetype != ""
47
let l:cmd = l:cmd + ['--type', &filetype]
48
endif
49
0 commit comments