diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-06 14:32:07 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-06 14:32:07 +0200 |
commit | 84ec4eedcdd2892249b5369f91a6dd1d12fef2fc (patch) | |
tree | 6c9806851123656af2b71f6c6f5d89649442909c /compiler/typescript.vim | |
parent | 66b769328c4511b2273f01c70de971c41f6964dd (diff) | |
download | vim-polyglot-4.0.0.tar.gz vim-polyglot-4.0.0.zip |
Switch typescript provider, closes #428v4.0.0
Diffstat (limited to 'compiler/typescript.vim')
-rw-r--r-- | compiler/typescript.vim | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/compiler/typescript.vim b/compiler/typescript.vim index 10f6823e..48c60ab3 100644 --- a/compiler/typescript.vim +++ b/compiler/typescript.vim @@ -2,33 +2,24 @@ if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != finish endif -if exists("current_compiler") +if exists('current_compiler') finish endif -let current_compiler = "typescript" -if !exists("g:typescript_compiler_binary") - let g:typescript_compiler_binary = "tsc" -endif +let current_compiler='typescript' -if !exists("g:typescript_compiler_options") - let g:typescript_compiler_options = "" +if !exists('g:typescript_compiler_binary') + let g:typescript_compiler_binary = 'tsc' endif -if exists(":CompilerSet") != 2 - command! -nargs=* CompilerSet setlocal <args> +if !exists('g:typescript_compiler_options') + if exists('g:syntastic_typescript_tsc_args') + let g:typescript_compiler_options = g:syntastic_typescript_tsc_args + else + let g:typescript_compiler_options = '' + endif endif -let s:cpo_save = &cpo -set cpo-=C - -execute 'CompilerSet makeprg=' - \ . escape(g:typescript_compiler_binary, ' ') - \ . '\ ' - \ . escape(g:typescript_compiler_options, ' ') - \ . '\ $*\ %' +let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %' CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m - -let &cpo = s:cpo_save -unlet s:cpo_save |