mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-13 22:13:50 -05:00
Update
This commit is contained in:
@@ -905,7 +905,7 @@ endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
|
||||
augroup filetypedetect
|
||||
" ocaml, from opam.vim in rgrinberg/vim-ocaml
|
||||
au BufNewFile,BufRead opam,*.opam set filetype=opam
|
||||
au BufNewFile,BufRead opam,*.opam,*.opam.template set filetype=opam
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1105,7 +1105,24 @@ endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1
|
||||
augroup filetypedetect
|
||||
" racket, from racket.vim in wlangstroth/vim-racket
|
||||
au BufRead,BufNewFile *.rkt,*.rktl set filetype=racket
|
||||
"
|
||||
let g:racket_hash_lang_regexp = '^#lang\s\+\([^][)(}{[:space:]]\+\)'
|
||||
|
||||
" Tries to detect filetype from #lang line; defaults to ft=racket.
|
||||
function RacketDetectHashLang()
|
||||
let old_ft = &filetype
|
||||
|
||||
let matches = matchlist(getline(1), g:racket_hash_lang_regexp)
|
||||
if ! empty(matches)
|
||||
let &l:filetype = matches[1]
|
||||
endif
|
||||
|
||||
if &filetype == old_ft
|
||||
set filetype=racket
|
||||
endif
|
||||
endfunction
|
||||
|
||||
au BufRead,BufNewFile *.rkt,*.rktl call RacketDetectHashLang()
|
||||
augroup end
|
||||
endif
|
||||
|
||||
@@ -1437,15 +1454,15 @@ endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
augroup filetypedetect
|
||||
" typescript, from tsx.vim in HerringtonDarkholme/yats.vim
|
||||
autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx
|
||||
" typescript, from typescript.vim in HerringtonDarkholme/yats.vim
|
||||
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||
augroup filetypedetect
|
||||
" typescript, from typescript.vim in HerringtonDarkholme/yats.vim
|
||||
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
||||
" typescript, from typescriptreact.vim in HerringtonDarkholme/yats.vim
|
||||
autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescriptreact
|
||||
augroup end
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user