summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typescript.vim31
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