This commit is contained in:
Adam Stankiewicz
2021-01-14 20:59:40 +01:00
parent 7bde552a46
commit 22040ce638
28 changed files with 273 additions and 430 deletions

View File

@@ -5,7 +5,7 @@ endif
" Vim ABAP syntax file
" Language: SAP - ABAP/R4
" Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com>
" Last Change: 2018 Dec 12
" Last Change: 2021 Jan 02
" Comment: Thanks to EPI-USE Labs for all your assistance. :)
" Quit when a syntax file was already loaded
@@ -197,4 +197,4 @@ hi def link abapHex Number
let b:current_syntax = "abap"
" vim: ts=8 sw=2
" vim: ts=8 sw=2

View File

@@ -93,10 +93,6 @@ syn match crystalStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}"
syn match crystalStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
syn region crystalInterpolation matchgroup=crystalInterpolationDelim start="#{" end="}" contained contains=TOP
syn match crystalInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=crystalInterpolationDelim,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable,crystalPredefinedVariable
syn match crystalInterpolationDelim "#\ze\%(\$\|@@\=\)\w\+" display contained
syn match crystalInterpolation "#\$\%(-\w\|\W\)" display contained contains=crystalInterpolationDelim,crystalPredefinedVariable,crystalInvalidVariable
syn match crystalInterpolationDelim "#\ze\$\%(-\w\|\W\)" display contained
syn region crystalNoInterpolation start="\\#{" end="}" contained
syn match crystalNoInterpolation "\\#{" display contained
syn match crystalNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained
@@ -156,7 +152,6 @@ syn match crystalAnnotationName "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w
syn match crystalConstant "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@="
syn match crystalClassVariable "@@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
syn match crystalInstanceVariable "@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
syn match crystalGlobalVariable "$\%(\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*\|-.\)"
syn match crystalFreshVariable "\%(\h\|[^\x00-\x7F]\)\@1<!%\%(\h\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
syn match crystalSymbol "[]})\"':]\@1<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[][=?]\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
syn match crystalSymbol "[]})\"':]\@1<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
@@ -172,17 +167,11 @@ SynFold ':' syn region crystalSymbol start="[]})\"':]\@1<!:\"" end="\"" skip="\\
syn match crystalBlockParameter "\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" contained
syn region crystalBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=crystalBlockParameter
syn match crystalInvalidVariable "$[^ %A-Za-z_-]"
syn match crystalPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]#
syn match crystalPredefinedVariable "$\d\+" display
syn match crystalPredefinedVariable "$_\>" display
syn match crystalPredefinedVariable "$-[0FIKadilpvw]\>" display
syn match crystalPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display
syn match crystalPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!"
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!"
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(crystal_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!"
" In Crystal, almost all special variables were removed and global variables
" are not supported https://github.com/crystal-lang/crystal/commit/e872c716d0e936557b34c614efc5a4c24d845f79
" NOTE: Only $~ and $? are supported since they are actually not global.
syn match crystalPredefinedVariable "$[~?]"
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(ARGF\|ARGV\|ENV\|STDERR\|STDIN\|STDOUT\)\>\%(\s*(\)\@!"
" Normal Regular Expression
SynFold '/' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|ifdef\|when\|in\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[imx]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial
@@ -250,9 +239,9 @@ SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\
SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart,@crystalStringSpecial keepend
" Module, Class, Method, and Alias Declarations
syn match crystalAliasDeclaration "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalGlobalVariable,crystalPredefinedVariable nextgroup=crystalAliasDeclaration2 skipwhite
syn match crystalAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalGlobalVariable,crystalPredefinedVariable
syn match crystalMethodDeclaration "[^[:space:];#(]\+" contained contains=crystalConstant,crystalFunction,crystalBoolean,crystalPseudoVariable,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable
syn match crystalAliasDeclaration "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalPredefinedVariable nextgroup=crystalAliasDeclaration2 skipwhite
syn match crystalAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalPredefinedVariable
syn match crystalMethodDeclaration "[^[:space:];#(]\+" contained contains=crystalConstant,crystalFunction,crystalBoolean,crystalPseudoVariable,crystalInstanceVariable,crystalClassVariable
syn match crystalFunctionDeclaration "[^[:space:];#(=]\+" contained contains=crystalFunction
syn match crystalTypeDeclaration "[^[:space:];#=]\+" contained contains=crystalTypeName
syn match crystalClassDeclaration "[^[:space:];#<]\+" contained contains=crystalClassName,crystalOperator
@@ -283,7 +272,6 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')
syn match crystalDefine "\<alias\>" nextgroup=crystalAliasDeclaration skipwhite skipnl
syn match crystalDefine "\<def\>" nextgroup=crystalMethodDeclaration skipwhite skipnl
syn match crystalDefine "\<fun\>" nextgroup=crystalFunctionDeclaration skipwhite skipnl
syn match crystalDefine "\<undef\>" nextgroup=crystalFunction skipwhite skipnl
syn match crystalDefine "\<\%(type\|alias\)\>\%(\s*\h\w*\s*=\)\@=" nextgroup=crystalTypeDeclaration skipwhite skipnl
syn match crystalClass "\<class\>" nextgroup=crystalClassDeclaration skipwhite skipnl
syn match crystalModule "\<module\>" nextgroup=crystalModuleDeclaration skipwhite skipnl
@@ -293,13 +281,17 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')
syn match crystalEnum "\<enum\>" nextgroup=crystalEnumDeclaration skipwhite skipnl
syn match crystalAnnotation "\<annotation\>" nextgroup=crystalAnnotationDeclaration skipwhite skipnl
SynFold 'def' syn region crystalMethodBlock start="\<\%(def\|macro\)\>" matchgroup=crystalDefine end="\%(\<\%(def\|macro\)\_s\+\)\@<!\<end\>" contains=TOP
SynFold 'class' syn region crystalBlock start="\<class\>" matchgroup=crystalClass end="\<end\>" contains=TOP
SynFold 'module' syn region crystalBlock start="\<module\>" matchgroup=crystalModule end="\<end\>" contains=TOP
SynFold 'struct' syn region crystalBlock start="\<struct\>" matchgroup=crystalStruct end="\<end\>" contains=TOP
SynFold 'lib' syn region crystalBlock start="\<lib\>" matchgroup=crystalLib end="\<end\>" contains=TOP
SynFold 'enum' syn region crystalBlock start="\<enum\>" matchgroup=crystalEnum end="\<end\>" contains=TOP
SynFold 'annotation' syn region crystalBlock start="\<annotation\>" matchgroup=crystalAnnotation end="\<end\>" contains=TOP
SynFold 'def' syn region crystalMethodBlock start="\<def\>" matchgroup=crystalDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=TOP,crystalForallKeyword
SynFold 'macro' syn region crystalMethodBlock start="\<macro\>" matchgroup=crystalDefine end="\%(\<macro\_s\+\)\@<!\<end\>" contains=TOP
SynFold 'class' syn region crystalBlock start="\<class\>" matchgroup=crystalClass end="\<end\>" contains=TOP
SynFold 'module' syn region crystalBlock start="\<module\>" matchgroup=crystalModule end="\<end\>" contains=TOP
SynFold 'struct' syn region crystalBlock start="\<struct\>" matchgroup=crystalStruct end="\<end\>" contains=TOP
SynFold 'lib' syn region crystalBlock start="\<lib\>" matchgroup=crystalLib end="\<end\>" contains=TOP
SynFold 'enum' syn region crystalBlock start="\<enum\>" matchgroup=crystalEnum end="\<end\>" contains=TOP
SynFold 'annotation' syn region crystalBlock start="\<annotation\>" matchgroup=crystalAnnotation end="\<end\>" contains=TOP
" keywords in method declaration
syn match crystalForallKeyword "\<forall\>[?!]\@!" contained containedin=crystalMethodBlock
" modifiers
syn match crystalConditionalModifier "\<\%(if\|unless\|ifdef\)\>" display
@@ -341,8 +333,9 @@ else
syn match crystalControl "\<macro\>[?!]\@!" nextgroup=crystalMacroDeclaration skipwhite skipnl
syn match crystalControl "\<enum\>[?!]\@!" nextgroup=crystalEnumDeclaration skipwhite skipnl
syn match crystalControl "\<annotation\>[?!]\@!" nextgroup=crystalAnnotationDeclaration skipwhite skipnl
syn match crystalControl "\<\%(case\|begin\|do\|if\|ifdef\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|in\|end\)\>[?!]\@!"
syn match crystalKeyword "\<\%(alias\|undef\)\>[?!]\@!"
syn match crystalControl "\<\%(case\|begin\|do\|if\|ifdef\|unless\|while\|select\|until\|else\|elsif\|ensure\|then\|when\|in\|end\)\>[?!]\@!"
syn match crystalKeyword "\<alias\>[?!]\@!"
syn match crystalForallKeyword "\<forall\>[?!]\@!"
endif
" Link attribute
@@ -353,13 +346,13 @@ if !exists('g:crystal_no_special_methods')
syn keyword crystalAccess protected private
" attr is a common variable name
syn keyword crystalAttribute abstract
syn match crystalAttribute "\<\%(class_\)\=\%(getter\|setter\|property\)[!?]\=\s" display
syn match crystalAttribute "\<\%(\%(class_\)\=\%(getter\|setter\|property\)[!?]\=\|def_\%(clone\|equals\|equals_and_hash\|hash\)\|delegate\|forward_missing_to\)\s" display
syn match crystalControl "\<\%(abort\|at_exit\|exit\|fork\|loop\)\>[?!]\@!" display
syn keyword crystalException raise
" false positive with 'include?'
syn match crystalInclude "\<include\>[?!]\@!" display
syn keyword crystalInclude extend require
syn keyword crystalKeyword caller typeof pointerof sizeof instance_sizeof
syn keyword crystalKeyword caller typeof pointerof sizeof instance_sizeof offsetof
syn match crystalRecord "\<record\%(\s\+\u\w*\)\@=" display
endif
@@ -404,16 +397,16 @@ SynFold '#' syn region crystalMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\|select\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|ifdef\|in\|module\|next\|nil\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(rescue\|return\|self\|super\|previous_def\|then\|true\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|in\|while\|yield\|with\|__FILE__\|__LINE__\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(unless\|until\|when\|in\|while\|yield\|with\|__FILE__\|__LINE__\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE
syn match crystalKeywordAsMethod "\<\%(if\|ifdef\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE
syn match crystalKeywordAsMethod "\<\%(if\|ifdef\|module\|unless\|until\|while\)[?!]" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(abort\|at_exit\|caller\|exit\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(extend\|fork\|include\|asm\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(loop\|private\|protected\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(require\|raise\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(typeof\|pointerof\|sizeof\|instance_sizeof\|\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(typeof\|pointerof\|sizeof\|instance_sizeof\|offsetof\|\)\>" transparent contains=NONE
hi def link crystalClass crystalDefine
hi def link crystalModule crystalDefine
@@ -450,7 +443,6 @@ hi def link crystalStructName crystalConstant
hi def link crystalLibName crystalConstant
hi def link crystalEnumName crystalConstant
hi def link crystalAnnotationName crystalConstant
hi def link crystalGlobalVariable crystalIdentifier
hi def link crystalBlockParameter crystalIdentifier
hi def link crystalInstanceVariable crystalIdentifier
hi def link crystalFreshVariable crystalIdentifier
@@ -486,9 +478,9 @@ hi def link crystalRegexp crystalString
hi def link crystalMacro PreProc
hi def link crystalMacroDelim crystalMacro
hi def link crystalMacroKeyword crystalKeyword
hi def link crystalForallKeyword crystalDefine
hi def link crystalLinkAttrDelim crystalMacroDelim
hi def link crystalError Error
hi def link crystalInvalidVariable crystalError
hi def link crystalSpaceError crystalError
hi def link crystalInvalidInteger crystalError

View File

@@ -143,7 +143,7 @@ exec 'syntax region juliaConditionalEBlock matchgroup=juliaConditional transpar
exec 'syntax region juliaWhileBlock matchgroup=juliaRepeat start="'.s:nodot.'\<while\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaForBlock matchgroup=juliaRepeat start="'.s:nodot.'\<for\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaOuter fold'
exec 'syntax region juliaBeginBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<begin\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<function\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<function\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<macro\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<quote\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
exec 'syntax region juliaStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
@@ -344,7 +344,7 @@ exec 'syntax region juliaQuotedParBlockS matchgroup=juliaQParDelim contained s
" force precedence over Symbols
syntax match juliaOperator display "::"
syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,@juliaSpellcheckComments
syntax region juliaCommentM matchgroup=juliaCommentDelim fold start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
syntax keyword juliaTodo contained TODO FIXME XXX

File diff suppressed because one or more lines are too long

View File

@@ -1,91 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'syntax/lilypond.vim')
finish
endif
" LilyPond syntax file
" Language: LilyPond
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
" Last Change: 2010 Jul 26
"
" Installed As: vim/syntax/lilypond.vim
" Uses Generated File: vim/syntax/lilypond-words.vim
"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Read the LilyPond syntax match groups:
" lilyKeyword, lilyReservedWord, lilyNote
if version < 600
so <sfile>:p:h/lilypond-words.vim
else
runtime! syntax/lilypond-words.vim
if exists("b:current_syntax")
unlet b:current_syntax
endif
endif
" Match also parethesis of angle type
setlocal mps+=<:>
" Case matters
syn case match
syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord,lilyScheme
syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold
syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold
syn region lilyMatcher matchgroup=Delimiter start="<" skip="\\\\\|\\[{<>}]" end=">" contains=@lilyMatchGroup fold
syn region lilyString start=/"/ end=/"/ skip=/\\"/
syn region lilyComment start="%{" skip="%$" end="%}"
syn region lilyComment start="%\([^{]\|$\)" end="$"
syn match lilyNumber "[-_^.]\?\d\+[.]\?"
syn match lilySlur "[(~)]"
syn match lilySlur "\\[()]"
syn match lilySpecial "\\[<!>\\]"
" avoid highlighting the extra character in situations like
" c--\mf c^^\mf c__\mf
syn match lilyArticulation "[-_^][-_^+|>.]"
" Include Scheme syntax highlighting, where appropriate
syn include @embeddedScheme syntax/scheme.vim
unlet b:current_syntax
syn region lilyScheme matchgroup=Delimiter start="#['`]\?(" matchgroup=Delimiter end=")" contains=@embeddedScheme
" Rest of syntax highlighting rules start here
"
" " Define the default highlighting.
" " For version 5.7 and earlier: only when not done already
" " For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_lily_syn_inits")
if version < 508
let did_lily_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink Delimiter Identifier
HiLink lilyString String
HiLink lilyComment Comment
HiLink lilyNote Identifier
HiLink lilyArticulation PreProc
HiLink lilyKeyword Keyword
HiLink lilyReservedWord Type
HiLink lilyNumber Constant
HiLink lilySpecial Special
HiLink lilySlur ModeMsg
delcommand HiLink
endif
let b:current_syntax = "lilypond"

View File

@@ -27,6 +27,9 @@ if exists("b:current_syntax") && b:current_syntax == "ocaml"
finish
endif
let s:keepcpo = &cpo
set cpo&vim
" ' can be used in OCaml identifiers
setlocal iskeyword+='
@@ -388,4 +391,7 @@ hi def link ocamlPpxEncl ocamlEncl
let b:current_syntax = "ocaml"
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: ts=8

View File

@@ -8,6 +8,7 @@ endif
syntax keyword odinUsing using
syntax keyword odinTransmute transmute
syntax keyword odinCast cast
syntax keyword odinDistinct distinct
syntax keyword odinOpaque opaque
@@ -68,7 +69,6 @@ syntax match odinFunction "\v<\w*>(\s*::\s*proc)@="
syntax match odinTagNote "@\<\w\+\>" display
syntax match odinClass "\v<[A-Z]\w+>" display
syntax match odinConstant "\v<[A-Z0-9,_]+>" display
syntax match odinRange "\.\." display
syntax match odinHalfRange "\.\.\<" display
@@ -79,7 +79,11 @@ syntax match odinReturnOp "->" display
syntax match odinInteger "\-\?\<\d\+\>" display
syntax match odinFloat "\-\?\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=" display
syntax match odinHex "\-\?\<0x[0-9A-Fa-f]\+\>" display
syntax match odinHex "\<0[xX][0-9A-Fa-f]\+\>" display
syntax match odinDoz "\<0[zZ][0-9a-bA-B]\+\>" display
syntax match odinOct "\<0[oO][0-7]\+\>" display
syntax match odinBin "\<0[bB][01]\+\>" display
syntax match odinAddressOf "&" display
syntax match odinDeref "\^" display
@@ -93,6 +97,7 @@ syntax region odinBlockComment start=/\v\/\*/ end=/\v\*\// contains=odinBlockCom
highlight link odinUsing Keyword
highlight link odinTransmute Keyword
highlight link odinCast Keyword
highlight link odinDistinct Keyword
highlight link odinOpaque Keyword
highlight link odinReturn Keyword
@@ -162,8 +167,6 @@ highlight link odinFixMe Todo
highlight link odinNoCheckin Todo
highlight link odinHack Todo
highlight link odinClass Type
highlight link odinTemplate Constant
highlight link odinTagNote Identifier
@@ -174,5 +177,8 @@ highlight link odinNull Type
highlight link odinInteger Number
highlight link odinFloat Float
highlight link odinHex Number
highlight link odinOct Number
highlight link odinBin Number
highlight link odinDoz Number
let b:current_syntax = "odin"

View File

@@ -9,7 +9,7 @@ endif
" License: Vim license (see `:help license`)
" Based on PostgreSQL 13.1
" Automatically generated on 2020-12-30 at 10:21:40
" Automatically generated on 2021-01-13 at 20:54:21
if exists("b:current_syntax")
finish
@@ -2010,20 +2010,26 @@ else
\ contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlPlpgsqlKeyword,sqlPlpgsqlVariable,sqlPlpgsqlOperator,sqlNumber,sqlIsOperator,sqlString,sqlTodo
endif
" Folding
syn region sqlFold start='^\s*\zs\c\(create\|update\|alter\|select\|insert\|do\)\>' end=';$' transparent fold contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo,plpgsql
let s:plgroups = 'plpgsql'
" PL/<any other language>
fun! s:add_syntax(s)
execute 'syn include @PL' . a:s . ' syntax/' . a:s . '.vim'
execute 'syn include @PL' .. a:s .. ' syntax/' .. a:s .. '.vim'
unlet b:current_syntax
execute 'syn region pgsqlpl' . a:s . ' matchgroup=sqlString start=+\$' . a:s . '\$+ end=+\$' . a:s . '\$+ keepend contains=@PL' . a:s
execute 'syn region pgsqlpl' .. a:s .. ' matchgroup=sqlString start=+\$' .. a:s .. '\$+ end=+\$' .. a:s .. '\$+ keepend contains=@PL' .. a:s
let s:plgroups .= ',pgsqlpl' .. a:s
endf
for pl in get(b:, 'pgsql_pl', get(g:, 'pgsql_pl', []))
call s:add_syntax(pl)
endfor
" Folding
execute "syn region sqlFold start='^\s*\zs\c\(create\|update\|alter\|select\|insert\|do\)\>' end=';$' transparent fold "
\ .. "contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo," .. s:plgroups
unlet s:plgroups
" Default highlighting
hi def link sqlCatalog Constant
hi def link sqlComment Comment

View File

@@ -5,7 +5,7 @@ endif
" Vim syntax file
" Language: PROLOG
" Maintainer: Anton Kochkov <anton.kochkov@gmail.com>
" Last Change: 2019 Aug 29
" Last Change: 2021 Jan 05
" There are two sets of highlighting in here:
" If the "prolog_highlighting_clean" variable exists, it is rather sparse.
@@ -25,16 +25,16 @@ syn case match
" Very simple highlighting for comments, clause heads and
" character codes. It respects prolog strings and atoms.
syn region prologCComment start=+/\*+ end=+\*/+
syn match prologComment +%.*+
syn region prologCComment start=+/\*+ end=+\*/+ contains=@Spell
syn match prologComment +%.*+ contains=@Spell
if !exists("prolog_highlighting_no_keyword")
syn keyword prologKeyword module meta_predicate multifile dynamic
endif
syn match prologCharCode +0'\\\=.+
syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause
syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause contains=@NoSpell
if !exists("prolog_highlighting_clean")

View File

@@ -111,13 +111,13 @@ syntax match tsxEqual +=+ display contained
" <tag id="sample">
" s~~~~~~e
syntax region tsxString contained start=+"+ end=+"+ contains=tsxEntity,@Spell display
syntax region tsxString contained start=+["']+ end=+["']+ contains=tsxEntity,@Spell display
" <tag key={this.props.key}>
" s~~~~~~~~~~~~~~e
syntax region tsxEscJs
\ contained
\ contains=@typescriptValue,@tsxComment
\ contains=@typescriptValue,@tsxComment,typescriptObjectSpread
\ matchgroup=typescriptBraces
\ start=+{+
\ end=+}+