2019-03-04 09:28:35 +01:00
|
|
|
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'typescript') != -1
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2015-03-10 21:56:33 -07:00
|
|
|
if exists("b:did_ftplugin")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
let b:did_ftplugin = 1
|
|
|
|
|
|
|
|
let s:cpo_save = &cpo
|
|
|
|
set cpo-=C
|
|
|
|
|
2013-09-26 12:41:08 +02:00
|
|
|
compiler typescript
|
|
|
|
setlocal commentstring=//\ %s
|
2015-03-10 21:56:33 -07:00
|
|
|
|
|
|
|
" Set 'formatoptions' to break comment lines but not other lines,
|
|
|
|
" " and insert the comment leader when hitting <CR> or using "o".
|
|
|
|
setlocal formatoptions-=t formatoptions+=croql
|
|
|
|
|
2017-11-19 21:26:59 +01:00
|
|
|
setlocal suffixesadd+=.ts,.tsx
|
2016-05-02 10:42:37 +02:00
|
|
|
|
2015-03-10 21:56:33 -07:00
|
|
|
let b:undo_ftplugin = "setl fo< ofu< com< cms<"
|
|
|
|
|
|
|
|
let &cpo = s:cpo_save
|
|
|
|
unlet s:cpo_save
|