Added TypeScript formatting options

vvakame/typescript-formatter now support reading from stdin, but a
filename has to be specified. I've tried it with both unsaved and saved
buffers and it works fine.
This commit is contained in:
Dani Hodovic 2015-03-22 16:59:57 +01:00
parent ffc0937d7b
commit c6afe09669

View File

@ -58,6 +58,11 @@ if !exists("g:formatprg_args_expr_javascript") && !exists("g:formatprg_args_java
let g:formatprg_args_expr_javascript = '"-f - -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")' let g:formatprg_args_expr_javascript = '"-f - -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")'
endif endif
if !exists("g:formatprg_typescript") | let g:formatprg_typescript = "tsfmt" | endif
if !exists("g:formatprg_args_expr_typescript") && !exists("g:formatprg_args_typescript")
let g:formatprg_args_expr_typescript = '"--stdin %"'
endif
if !exists("g:formatprg_json") | let g:formatprg_json = "js-beautify" | endif if !exists("g:formatprg_json") | let g:formatprg_json = "js-beautify" | endif
if !exists("g:formatprg_args_expr_json") && !exists("g:formatprg_args_json") if !exists("g:formatprg_args_expr_json") && !exists("g:formatprg_args_json")
let g:formatprg_args_expr_json = '"-f - -".(&expandtab ? "s ".&shiftwidth : "t")' let g:formatprg_args_expr_json = '"-f - -".(&expandtab ? "s ".&shiftwidth : "t")'