Improve prettier definition.
This commit is contained in:
parent
d65d35ebe7
commit
3c50ddb506
@ -21,10 +21,6 @@ if !exists('g:autoformat_verbosemode')
|
||||
let g:autoformat_verbosemode = 0
|
||||
endif
|
||||
|
||||
if !exists('g:formatdef_prettier')
|
||||
let g:formatdef_prettier = '"prettier"'
|
||||
endif
|
||||
|
||||
|
||||
" Python
|
||||
if !exists('g:formatdef_autopep8')
|
||||
@ -163,6 +159,12 @@ if !exists('g:formatdef_standard_javascript')
|
||||
let g:formatdef_standard_javascript = '"standard --fix --stdin"'
|
||||
endif
|
||||
|
||||
|
||||
if !exists('g:formatdef_prettier')
|
||||
let g:formatdef_prettier = '"prettier --stdin --stdin-filepath ".expand("%:p").(&textwidth ? " --print-width ".&textwidth : "")." --tab-width=".shiftwidth()'
|
||||
endif
|
||||
|
||||
|
||||
" This is an xo formatter (inspired by the above eslint formatter)
|
||||
" To support ignore and overrides options, we need to use a tmp file
|
||||
" So we create a tmp file here and then remove it afterwards
|
||||
|
Loading…
Reference in New Issue
Block a user