Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
typescript.vim48 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:     TypeScript3" Maintainer:   Herrington Darkholme4" Last Change:  2024 May 245" Based On:     Herrington Darkholme's yats.vim6" Changes:      Go to https://github.com/HerringtonDarkholme/yats.vim for recent changes.7" Origin:       https://github.com/othree/yajs8" Credits:      Kao Wei-Ko(othree), Jose Elera Campana, Zhao Yi, Claudio Fleiner, Scott Shattuck9"               (This file is based on their hard work), gumnos (From the #vim10"               IRC Channel in Freenode)11 12" This is the same syntax that is in yats.vim, but:13" - flattened into one file14" - HiLink commands changed to "hi def link"15" - Setting 'cpo' to the Vim value16 17if !exists("main_syntax")18  if exists("b:current_syntax")19    finish20  endif21  let main_syntax = 'typescript'22endif23 24let s:cpo_save = &cpo25set cpo&vim26 27" this region is NOT used in TypeScriptReact28" nextgroup doesn't contain objectLiteral, let outer region contains it29syntax region typescriptTypeCast matchgroup=typescriptTypeBrackets30  \ start=/< \@!/ end=/>/31  \ contains=@typescriptType32  \ nextgroup=@typescriptExpression33  \ contained skipwhite oneline34 35 36"""""""""""""""""""""""""""""""""""""""""""""""""""37" Source the part common with typescriptreact.vim38source <sfile>:h/shared/typescriptcommon.vim39 40 41let b:current_syntax = "typescript"42if main_syntax == 'typescript'43  unlet main_syntax44endif45 46let &cpo = s:cpo_save47unlet s:cpo_save48 
codekingpro/portable-devtools · Team Ai