forked from aniani/vim
Update runtime files.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: J
|
||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||
" URL: https://github.com/glts/vim-j
|
||||
" Last Change: 2015-01-11
|
||||
" Maintainer: David Bürgin <dbuergin@gluet.ch>
|
||||
" URL: https://gitlab.com/glts/vim-j
|
||||
" Last Change: 2019-11-12
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -23,10 +23,10 @@ syntax match jControl /\<\%(for\|goto\|label\)_\a\k*\./
|
||||
" Standard library names. A few names need to be defined with ":syntax match"
|
||||
" because they would otherwise take precedence over the corresponding jControl
|
||||
" and jDefineExpression items.
|
||||
syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB dbhelp libjqt
|
||||
syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFBE IFIOS IFJA IFJHS IFJNET IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCHAR2 JCHAR4 JCMPX JFL JINT JLIB JPTR JSB JSIZES JSTR JSTR2 JSTR4 JTYPES JVERSION LF LF2 LIBFILE TAB UNAME UNXLIB dbhelp libjqt
|
||||
syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows rxapply rxmerge table
|
||||
syntax keyword jStdlibConjunction bind cuts def on
|
||||
syntax keyword jStdlibVerb AND Endian IFDEF OR XOR anddf android_exec_am android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring cleartags clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert compare coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcompare fcompares fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getalpha getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpath jpathsep jsystemdefs launch list ljust load loadd loadtags mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc rxE rxall rxcomp rxcut rxeq rxerror rxfirst rxfree rxfrom rxhandles rxin rxindex rxinfo rxmatch rxmatches rxrplc rxutf8 script scriptd scripts setalpha setbreak shell show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset ta tagcp tagopen tagselect take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep xedit
|
||||
syntax keyword jStdlibVerb AND Endian IFDEF OR XOR abspath anddf android_exec_am android_exec_host android_getdisplaymetrics andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert compare coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dbcut dberm dberr dbg dbinto dbjmp dblocals dblxq dblxs dbnxt dbout dbover dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcompare fcompares fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getalpha getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf16 isutf8 jcwdpath joinstring jpath jpathsep jsystemdefs launch list ljust load loadd mema memf memr memu memw nameclass namelist names nc nl pick quote require rjust rplc rxE rxall rxcomp rxcut rxeq rxerror rxfirst rxfree rxfrom rxhandles rxin rxindex rxinfo rxmatch rxmatches rxrplc rxutf8 script scriptd scripts setalpha setbreak shell show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid stderr stdin stdout stringreplace symdat symget symset take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolist tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount undquote unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep xedit
|
||||
syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/
|
||||
syntax match jStdlibVerb /\<\%(Note\|\%(assert\|break\|do\)\.\@!\)\>/
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
" Placeholder for backwards compatilibity: .jsx used to stand for JavaScript.
|
||||
" Placeholder for backwards compatilibity: .jsx used to be associated with the
|
||||
" filetpye JavaScript.
|
||||
runtime! syntax/javascript.vim
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
2057
runtime/syntax/typescriptcommon.vim
Normal file
2057
runtime/syntax/typescriptcommon.vim
Normal file
File diff suppressed because it is too large
Load Diff
160
runtime/syntax/typescriptreact.vim
Normal file
160
runtime/syntax/typescriptreact.vim
Normal file
@@ -0,0 +1,160 @@
|
||||
" Vim syntax file
|
||||
" Language: TypeScript with React (JSX)
|
||||
" 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
|
||||
|
||||
if !exists("main_syntax")
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let main_syntax = 'typescriptreact'
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syntax region tsxTag
|
||||
\ start=+<\([^/!?<>="':]\+\)\@=+
|
||||
\ skip=+</[^ /!?<>"']\+>+
|
||||
\ end=+/\@<!>+
|
||||
\ end=+\(/>\)\@=+
|
||||
\ contained
|
||||
\ contains=tsxTagName,tsxIntrinsicTagName,tsxAttrib,tsxEscJs,
|
||||
\tsxCloseString,@tsxComment
|
||||
|
||||
syntax match tsxTag /<>/ contained
|
||||
|
||||
|
||||
" <tag></tag>
|
||||
" s~~~~~~~~~e
|
||||
" and self close tag
|
||||
" <tag/>
|
||||
" s~~~~e
|
||||
" A big start regexp borrowed from https://git.io/vDyxc
|
||||
syntax region tsxRegion
|
||||
\ start=+<\_s*\z([a-zA-Z1-9\$_-]\+\(\.\k\+\)*\)+
|
||||
\ skip=+<!--\_.\{-}-->+
|
||||
\ end=+</\_s*\z1>+
|
||||
\ matchgroup=tsxCloseString end=+/>+
|
||||
\ fold
|
||||
\ contains=tsxRegion,tsxCloseString,tsxCloseTag,tsxTag,tsxCommentInvalid,tsxFragment,tsxEscJs,@Spell
|
||||
\ keepend
|
||||
\ extend
|
||||
|
||||
" <> </>
|
||||
" s~~~~~~e
|
||||
" A big start regexp borrowed from https://git.io/vDyxc
|
||||
syntax region tsxFragment
|
||||
\ start=+\(\((\|{\|}\|\[\|,\|&&\|||\|?\|:\|=\|=>\|\Wreturn\|^return\|\Wdefault\|^\|>\)\_s*\)\@<=<>+
|
||||
\ skip=+<!--\_.\{-}-->+
|
||||
\ end=+</>+
|
||||
\ fold
|
||||
\ contains=tsxRegion,tsxCloseString,tsxCloseTag,tsxTag,tsxCommentInvalid,tsxFragment,tsxEscJs,@Spell
|
||||
\ keepend
|
||||
\ extend
|
||||
|
||||
" </tag>
|
||||
" ~~~~~~
|
||||
syntax match tsxCloseTag
|
||||
\ +</\_s*[^/!?<>"']\+>+
|
||||
\ contained
|
||||
\ contains=tsxTagName,tsxIntrinsicTagName
|
||||
|
||||
syntax match tsxCloseTag +</>+ contained
|
||||
|
||||
syntax match tsxCloseString
|
||||
\ +/>+
|
||||
\ contained
|
||||
|
||||
" <!-- -->
|
||||
" ~~~~~~~~
|
||||
syntax match tsxCommentInvalid /<!--\_.\{-}-->/ display
|
||||
|
||||
syntax region tsxBlockComment
|
||||
\ contained
|
||||
\ start="/\*"
|
||||
\ end="\*/"
|
||||
|
||||
syntax match tsxLineComment
|
||||
\ "//.*$"
|
||||
\ contained
|
||||
\ display
|
||||
|
||||
syntax cluster tsxComment contains=tsxBlockComment,tsxLineComment
|
||||
|
||||
syntax match tsxEntity "&[^; \t]*;" contains=tsxEntityPunct
|
||||
syntax match tsxEntityPunct contained "[&.;]"
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~
|
||||
syntax match tsxTagName
|
||||
\ +[</]\_s*[^/!?<>"'* ]\++hs=s+1
|
||||
\ contained
|
||||
\ nextgroup=tsxAttrib
|
||||
\ skipwhite
|
||||
\ display
|
||||
syntax match tsxIntrinsicTagName
|
||||
\ +[</]\_s*[a-z1-9-]\++hs=s+1
|
||||
\ contained
|
||||
\ nextgroup=tsxAttrib
|
||||
\ skipwhite
|
||||
\ display
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" ~~~
|
||||
syntax match tsxAttrib
|
||||
\ +[a-zA-Z_][-0-9a-zA-Z_]*+
|
||||
\ nextgroup=tsxEqual skipwhite
|
||||
\ contained
|
||||
\ display
|
||||
|
||||
" <tag id="sample">
|
||||
" ~
|
||||
syntax match tsxEqual +=+ display contained
|
||||
\ nextgroup=tsxString skipwhite
|
||||
|
||||
" <tag id="sample">
|
||||
" s~~~~~~e
|
||||
syntax region tsxString contained start=+"+ end=+"+ contains=tsxEntity,@Spell display
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" s~~~~~~~~~~~~~~e
|
||||
syntax region tsxEscJs
|
||||
\ contained
|
||||
\ contains=@typescriptValue,@tsxComment
|
||||
\ matchgroup=typescriptBraces
|
||||
\ start=+{+
|
||||
\ end=+}+
|
||||
\ extend
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Source the part common with typescriptreact.vim
|
||||
source <sfile>:h/typescriptcommon.vim
|
||||
|
||||
|
||||
syntax cluster typescriptExpression add=tsxRegion,tsxFragment
|
||||
|
||||
hi def link tsxTag htmlTag
|
||||
hi def link tsxTagName Function
|
||||
hi def link tsxIntrinsicTagName htmlTagName
|
||||
hi def link tsxString String
|
||||
hi def link tsxNameSpace Function
|
||||
hi def link tsxCommentInvalid Error
|
||||
hi def link tsxBlockComment Comment
|
||||
hi def link tsxLineComment Comment
|
||||
hi def link tsxAttrib Type
|
||||
hi def link tsxEscJs tsxEscapeJs
|
||||
hi def link tsxCloseTag htmlTag
|
||||
hi def link tsxCloseString Identifier
|
||||
|
||||
let b:current_syntax = "typescriptreact"
|
||||
if main_syntax == 'typescriptreact'
|
||||
unlet main_syntax
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
Reference in New Issue
Block a user