Mercurial > vim
view runtime/syntax/typescript.vim @ 18639:cb3163d590a1
Update runtime files.
Commit: https://github.com/vim/vim/commit/09c6f265b21065ffa9437837b1d0955137175e45
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 17 15:55:14 2019 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Nov 2019 16:00:05 +0100 |
parents | 235cbf491430 |
children | 82a28df1e2d5 |
line wrap: on
line source
" Vim syntax file " Language: TypeScript " Maintainer: Bram Moolenaar " Last Change: 2019 Nov 17 " Based On: Herrington Darkholme's yats.vim " Changes: See https:github.com/HerringtonDarkholme/yats.vim " Credits: See yats.vim on github " This is the same syntax that is in yats.vim, but: " - flattened into one file " - HiLink commands changed to "hi def link" " - Setting 'cpo' to the Vim value if !exists("main_syntax") if exists("b:current_syntax") finish endif let main_syntax = 'typescript' endif let s:cpo_save = &cpo set cpo&vim " this region is NOT used in TypeScriptReact " nextgroup doesn't contain objectLiteral, let outer region contains it syntax region typescriptTypeCast matchgroup=typescriptTypeBrackets \ start=/< \@!/ end=/>/ \ contains=@typescriptType \ nextgroup=@typescriptExpression \ contained skipwhite oneline """"""""""""""""""""""""""""""""""""""""""""""""""" " Source the part common with typescriptreact.vim source <sfile>:h/typescriptcommon.vim let b:current_syntax = "typescript" if main_syntax == 'typescript' unlet main_syntax endif let &cpo = s:cpo_save unlet s:cpo_save