summaryrefslogblamecommitdiffstats
path: root/compiler/typescript.vim
blob: 9ba313fe30438a054a824af3933685200afcad85 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                                                                                   




                                   



                                          



                                           



                                               







                                                    

                                                         
 


                     
     
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
  
if exists("current_compiler")
  finish
endif
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 = ""
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, ' ')
      \ . '\ $*\ %'

CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m

let &cpo = s:cpo_save
unlet s:cpo_save

endif