summaryrefslogtreecommitdiffstats
path: root/ftplugin/typescript.vim
blob: 2a9af1e2166ecea2ecf85656b3405f4be2e62b5a (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
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
  
if exists("b:did_ftplugin")
  finish
endif
let b:did_ftplugin = 1

let s:cpo_save = &cpo
set cpo-=C

compiler typescript
setlocal commentstring=//\ %s

" 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

setlocal suffixesadd+=.ts

let b:undo_ftplugin = "setl fo< ofu< com< cms<"

let &cpo = s:cpo_save
unlet s:cpo_save

endif