summaryrefslogtreecommitdiffstats
path: root/compiler/typescript.vim
blob: e4860092765c3c6e950d1735d18186adea832117 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
let files = filter(globpath(&rtp, 'compiler/typescript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
if len(files) > 0
  exec 'source ' . files[0]
  finish
endif
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')
  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 &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %'

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

endif