mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Switch typescript provider, closes #428
This commit is contained in:
@@ -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"
|
||||
let current_compiler='typescript'
|
||||
|
||||
if !exists('g:typescript_compiler_binary')
|
||||
let g:typescript_compiler_binary = 'tsc'
|
||||
endif
|
||||
|
||||
if !exists("g:typescript_compiler_options")
|
||||
let g:typescript_compiler_options = ""
|
||||
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
|
||||
|
||||
if exists(":CompilerSet") != 2
|
||||
command! -nargs=* CompilerSet setlocal <args>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user