1
0
Fork 0
mirror of synced 2024-07-02 13:31:09 -04:00
ultimate-vim/sources_non_forked/syntastic/syntax_checkers/typescript/tsc.vim

34 lines
1,022 B
VimL
Raw Normal View History

2014-02-24 21:22:30 -05:00
"============================================================================
"File: typescript.vim
"Description: TypeScript syntax checker. For TypeScript v0.8.0
"Maintainer: Bill Casarin <bill@casarin.ca>
"============================================================================
if exists("g:loaded_syntastic_typescript_tsc_checker")
finish
endif
let g:loaded_syntastic_typescript_tsc_checker=1
function! SyntaxCheckers_typescript_tsc_IsAvailable()
return executable("tsc")
endfunction
function! SyntaxCheckers_typescript_tsc_GetLocList()
let makeprg = syntastic#makeprg#build({
\ 'exe': 'tsc',
\ 'post_args': '--out ' . syntastic#util#DevNull(),
\ 'filetype': 'typescript',
\ 'subchecker': 'tsc' })
let errorformat = '%f %#(%l\,%c): %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'typescript',
\ 'name': 'tsc'})