This commit is contained in:
Adam Stankiewicz
2020-08-06 13:22:17 +02:00
parent 56121b4e27
commit 1e533e5982
10 changed files with 1073 additions and 962 deletions

View File

@@ -30,4 +30,54 @@ syntax region typescriptFuncCallArg contained matchgroup=typescriptPa
syntax region typescriptEventFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptEventExpression
syntax region typescriptEventString contained start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ contains=typescriptASCII,@events
syntax region typescriptDestructureString
\ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/
\ contains=typescriptASCII
\ nextgroup=typescriptDestructureAs
\ contained skipwhite skipempty
syntax cluster typescriptVariableDeclarations
\ contains=typescriptVariableDeclaration,@typescriptDestructures
syntax match typescriptVariableDeclaration /[A-Za-z_$]\k*/
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
\ contained skipwhite skipempty
syntax cluster typescriptDestructureVariables contains=
\ typescriptRestOrSpread,
\ typescriptDestructureComma,
\ typescriptDestructureLabel,
\ typescriptDestructureVariable,
\ @typescriptDestructures
syntax match typescriptDestructureVariable /[A-Za-z_$]\k*/ contained
\ nextgroup=typescriptDefaultParam
\ contained skipwhite skipempty
syntax match typescriptDestructureLabel /[A-Za-z_$]\k*\ze\_s*:/
\ nextgroup=typescriptDestructureAs
\ contained skipwhite skipempty
syntax match typescriptDestructureAs /:/
\ nextgroup=typescriptDestructureVariable,@typescriptDestructures
\ contained skipwhite skipempty
syntax match typescriptDestructureComma /,/ contained
syntax cluster typescriptDestructures contains=
\ typescriptArrayDestructure,
\ typescriptObjectDestructure
syntax region typescriptArrayDestructure matchgroup=typescriptBraces
\ start=/\[/ end=/]/
\ contains=@typescriptDestructureVariables,@typescriptComments
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
\ transparent contained skipwhite skipempty fold
syntax region typescriptObjectDestructure matchgroup=typescriptBraces
\ start=/{/ end=/}/
\ contains=typescriptDestructureString,@typescriptDestructureVariables,@typescriptComments
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
\ transparent contained skipwhite skipempty fold
endif

View File

@@ -29,16 +29,12 @@ syntax keyword typescriptIdentifier arguments this super
\ nextgroup=@afterIdentifier
syntax keyword typescriptVariable let var
\ nextgroup=typescriptVariableDeclaration
\ skipwhite skipempty skipnl
\ nextgroup=@typescriptVariableDeclarations
\ skipwhite skipempty
syntax keyword typescriptVariable const
\ nextgroup=typescriptEnum,typescriptVariableDeclaration
\ skipwhite
syntax match typescriptVariableDeclaration /[A-Za-z_$]\k*/
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
\ contained skipwhite skipempty skipnl
\ nextgroup=typescriptEnum,@typescriptVariableDeclarations
\ skipwhite skipempty
syntax region typescriptEnum matchgroup=typescriptEnumKeyword start=/enum / end=/\ze{/
\ nextgroup=typescriptBlock

View File

@@ -74,6 +74,7 @@ if exists("did_typescript_hilink")
HiLink typescriptStringMember String
HiLink typescriptTemplate String
HiLink typescriptEventString String
HiLink typescriptDestructureString String
HiLink typescriptASCII Special
HiLink typescriptTemplateSB Label
HiLink typescriptRegexpString String
@@ -87,6 +88,7 @@ if exists("did_typescript_hilink")
HiLink typescriptBranch Conditional
HiLink typescriptIdentifier Structure
HiLink typescriptVariable Identifier
HiLink typescriptDestructureVariable PreProc
HiLink typescriptEnumKeyword Identifier
HiLink typescriptRepeat Repeat
HiLink typescriptForOperator Repeat
@@ -100,6 +102,7 @@ if exists("did_typescript_hilink")
HiLink typescriptNumber Number
HiLink typescriptBoolean Boolean
HiLink typescriptObjectLabel typescriptLabel
HiLink typescriptDestructureLabel Function
HiLink typescriptLabel Label
HiLink typescriptTupleLable Label
HiLink typescriptStringProperty String

View File

@@ -109,11 +109,15 @@ syntax match juliaSemicolon display ";"
syntax match juliaComma display ","
syntax match juliaColon display ":"
" This is really ugly. It would be better to mask most keywords when a dot is
" found, introducing some kind of dot-environment
let s:nodot = '\%(\.\)\@'.s:d(1).'<!'
syntax match juliaErrorPar display "[])}]"
syntax match juliaErrorEnd display "\<end\>"
syntax match juliaErrorElse display "\<\%(else\|elseif\)\>"
syntax match juliaErrorCatch display "\<catch\>"
syntax match juliaErrorFinally display "\<finally\>"
exec 'syntax match juliaErrorEnd display "'.s:nodot.'\<end\>"'
exec 'syntax match juliaErrorElse display "'.s:nodot.'\<\%(else\|elseif\)\>"'
exec 'syntax match juliaErrorCatch display "'.s:nodot.'\<catch\>"'
exec 'syntax match juliaErrorFinally display "'.s:nodot.'\<finally\>"'
syntax match juliaErrorSemicol display contained ";"
syntax region juliaParBlock matchgroup=juliaParDelim start="(" end=")" contains=@juliaExpressions,juliaComprehensionFor
@@ -122,10 +126,6 @@ syntax region juliaSqBraIdxBlock matchgroup=juliaParDelim start="\[" end="\]" c
exec 'syntax region juliaSqBraBlock matchgroup=juliaParDelim start="\%(^\|\s\|' . s:operators . '\)\@'.s:d(3).'<=\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS'
syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" contains=@juliaExpressions
" This is really ugly. It would be better to mask most keywords when a dot is
" found, introducing some kind of dot-environment
let s:nodot = '\%(\.\)\@'.s:d(1).'<!'
exec 'syntax match juliaKeyword display "'.s:nodot.'\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\|where\)\>"'
syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
exec 'syntax match juliaRepKeyword display "'.s:nodot.'\<\%(break\|continue\)\>"'

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,8 @@ syn match slimTag "\w\+[><]*" contained contains=htmlTagName n
syn match slimIdChar "#{\@!" contained nextgroup=slimId
syn match slimId "\%(\w\|-\)\+" contained nextgroup=@slimComponent
syn match slimClassChar "\." contained nextgroup=slimClass
syn match slimClass "\%(\w\|-\|\/\d+\|:\(\w\|-\)\+\)\+" contained nextgroup=@slimComponent
syn match slimClass "\%(\w\|-\|\/\|:\(\w\|-\)\+\)\+" contained nextgroup=@slimComponent
syn match slimInlineTagChar "\s*:\s*" contained nextgroup=slimTag,slimClassChar,slimIdChar
syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*{\s*" skip="}\s*\"" end="\s*}\s*" contained contains=slimAttr nextgroup=slimRuby

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
" vifm syntax file
" Maintainer: xaizek <xaizek@posteo.net>
" Last Change: June 22, 2020
" Last Change: July 27, 2020
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
if exists('b:current_syntax')
@@ -89,7 +89,7 @@ syntax case ignore
syntax keyword vifmHiGroups contained WildMenu Border Win CmdLine CurrLine
\ OtherLine Directory Link Socket Device Executable Selected BrokenLink
\ TopLine TopLineSel StatusLine JobLine SuggestBox Fifo ErrorMsg CmpMismatch
\ AuxWin OtherWin TabLine TabLineSel HardLink
\ AuxWin OtherWin TabLine TabLineSel TabNr HardLink LineNr OddLine
\ User1 User2 User3 User4 User5 User6 User7 User8 User9
syntax keyword vifmHiStyles contained
\ bold underline reverse inverse standout italic none