diff options
Diffstat (limited to 'syntax')
| -rw-r--r-- | syntax/basic/function.vim | 2 | ||||
| -rw-r--r-- | syntax/crystal.vim | 151 | ||||
| -rw-r--r-- | syntax/dart.vim | 20 | ||||
| -rw-r--r-- | syntax/ecrystal.vim | 37 | ||||
| -rw-r--r-- | syntax/elixir.vim | 5 | ||||
| -rw-r--r-- | syntax/go.vim | 2 | ||||
| -rw-r--r-- | syntax/graphql.vim | 4 | ||||
| -rw-r--r-- | syntax/i3config.vim | 6 | ||||
| -rw-r--r-- | syntax/javascript.vim | 2 | ||||
| -rw-r--r-- | syntax/meson.vim | 2 | ||||
| -rw-r--r-- | syntax/plantuml.vim | 15 | ||||
| -rw-r--r-- | syntax/python.vim | 11 | ||||
| -rw-r--r-- | syntax/racket.vim | 3 | ||||
| -rw-r--r-- | syntax/razor.vim | 1 | ||||
| -rw-r--r-- | syntax/tmux.vim | 43 | ||||
| -rw-r--r-- | syntax/vifm.vim | 6 | ||||
| -rw-r--r-- | syntax/zig.vim | 7 | 
17 files changed, 185 insertions, 132 deletions
| diff --git a/syntax/basic/function.vim b/syntax/basic/function.vim index 5acbb55c..d6cec847 100644 --- a/syntax/basic/function.vim +++ b/syntax/basic/function.vim @@ -21,7 +21,7 @@ syntax match   typescriptFuncName              contained /\K\k*/    \ skipwhite  " destructuring ({ a: ee }) => -syntax match   typescriptArrowFuncDef          contained /({\_[^}]*}\(:\_[^)]\)\?)\s*=>/ +syntax match   typescriptArrowFuncDef          contained /(\(\s*\({\_[^}]*}\|\k\+\)\(:\_[^)]\)\?,\?\)\+)\s*=>/    \ contains=typescriptArrowFuncArg,typescriptArrowFunc    \ nextgroup=@typescriptExpression,typescriptBlock    \ skipwhite skipempty diff --git a/syntax/crystal.vim b/syntax/crystal.vim index d48d15ce..e4b5403a 100644 --- a/syntax/crystal.vim +++ b/syntax/crystal.vim @@ -63,8 +63,9 @@ endfunction  com! -nargs=* SynFold call s:run_syntax_fold(<q-args>) -" Not-Top Cluster -syn cluster crystalNotTop contains=@crystalExtendedStringSpecial,@crystalRegexpSpecial,@crystalDeclaration,crystalConditional,crystalExceptional,crystalMethodExceptional,crystalTodo,crystalLinkAttr +" Top and Not-Top Clusters +syn cluster crystalTop    contains=TOP +syn cluster crystalNotTop contains=CONTAINED  " Whitespace Errors  if exists('g:crystal_space_errors') @@ -78,16 +79,16 @@ endif  " Operators  if exists('g:crystal_operators') -  syn match  crystalOperator "[~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::" +  syn match  crystalOperator "[~!^&|*/%+-]\|<=>\|<=\|\%(<\|\<\%(class\|struct\)\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@1<!>\|\*\*\|\.\.\.\|\.\.\|::"    syn match  crystalOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\|//" -  syn region crystalBracketOperator matchgroup=crystalOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@crystalNotTop +  syn region crystalBracketOperator matchgroup=crystalOperator start="\%(\w[?!]\=\|[]})]\)\@2<=\[" end="]" contains=TOP  endif  " Expression Substitution and Backslash Notation  syn match crystalStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}"                            contained display  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=ALLBUT,@crystalNotTop +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 @@ -127,7 +128,7 @@ syn cluster crystalExtendedStringSpecial contains=@crystalStringSpecial,crystalN  syn cluster crystalRegexpSpecial         contains=crystalInterpolation,crystalNoInterpolation,crystalStringEscape,crystalRegexpSpecial,crystalRegexpEscape,crystalRegexpBrackets,crystalRegexpCharClass,crystalRegexpDot,crystalRegexpQuantifier,crystalRegexpAnchor,crystalRegexpParens,crystalRegexpComment  " Numbers and ASCII Codes -syn match crystalASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" +syn match crystalASCIICode "\%(\w\|[]})\"'/]\)\@1<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"  syn match crystalInteger   "\<0x[[:xdigit:]_]\+\%([ui]\%(8\|16\|32\|64\|128\)\|f\%(32\|64\)\)\=\>" display  syn match crystalInteger   "\<0o[0-7_]\+\%([ui]\%(8\|16\|32\|64\|128\)\)\=\>" display  syn match crystalInteger   "\<0b[01_]\+\%([ui]\%(8\|16\|32\|64\|128\)\)\=\>" display @@ -135,33 +136,33 @@ syn match crystalInteger   "\<\d[[:digit:]_]*\%([ui]\%(8\|16\|32\|64\|128\)\|f\%  syn match crystalFloat     "\<\d[[:digit:]_]*\.\d[[:digit:]_]*\%(f\%(32\|64\)\)\=\>" contains=crystalInvalidInteger display  syn match crystalFloat     "\<\d[[:digit:]_]*\%(\.\d[[:digit:]_]*\)\=\%([eE][-+]\=[[:digit:]_]\+\)\%(f\%(32\|64\)\)\=\>" contains=crystalInvalidInteger display  " Note: 042 is invalid but 0, 0_, 0_u8 and 0_1 are valid (#73) -syn match crystalInvalidInteger "\.\@<!\<0\d\+\>" contained containedin=crystalFloat,crystalInteger display +syn match crystalInvalidInteger "\%(\.\|[eE][+-]\)\@2<!\<0\d\+\>" contained containedin=crystalFloat,crystalInteger display  " Identifiers  syn match crystalLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent  syn match crystalBlockArgument         "&[_[:lower:]][_[:alnum:]]"          contains=NONE display transparent -syn match  crystalTypeName         "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained -syn match  crystalClassName        "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained -syn match  crystalModuleName       "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained -syn match  crystalStructName       "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained -syn match  crystalLibName          "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained -syn match  crystalEnumName         "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained -syn match  crystalConstant         "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" +syn match  crystalTypeName         "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained +syn match  crystalClassName        "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained +syn match  crystalModuleName       "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained +syn match  crystalStructName       "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained +syn match  crystalLibName          "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained +syn match  crystalEnumName         "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained +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]\)\@<!%\%(\h\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display -syn match  crystalSymbol           "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[][=?]\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" -syn match  crystalSymbol           "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" -syn match  crystalSymbol           "[]})\"':]\@<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" -syn match  crystalSymbol           "[]})\"':]\@<!:\%(\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]\)" +syn match  crystalSymbol           "[]})\"':]\@1<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" +syn match  crystalSymbol           "[]})\"':]\@1<!:\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\="  syn match  crystalSymbol           "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1 -syn match  crystalSymbol           "[]})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="he=e-1 +syn match  crystalSymbol           "[]})\"':]\@1<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="he=e-1  syn match  crystalSymbol           "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1  syn match  crystalSymbol           "[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="hs=s+1,he=e-1 -SynFold ':' syn region crystalSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@crystalStringSpecial +SynFold ':' syn region crystalSymbol start="[]})\"':]\@1<!:\"" end="\"" skip="\\\\\|\\\"" contains=@crystalStringSpecial  syn match  crystalBlockParameter     "\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" contained  syn region crystalBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=crystalBlockParameter @@ -173,18 +174,18 @@ 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 "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!" -syn match crystalPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!" -syn match crystalPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!" -syn match crystalPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(crystal_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!" +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*(\)\@!"  " Normal Regular Expression  SynFold '/' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|ifdef\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[imx]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial  SynFold '/' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=/]\@!" end="/[imx]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial  " Generalized Regular Expression -SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r{"  end="}[imx]*"  skip="\\\\\|\\}"  contains=@crystalRegexpSpecial -SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r<"  end=">[imx]*"  skip="\\\\\|\\>"  contains=@crystalRegexpSpecial,crystalNestedAngleBrackets,crystalDelimEscape +SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r{"  end="}[imx]*"  skip="\\\\\|\\}"  contains=@crystalRegexpSpecial,crystalNestedRawCurlyBraces +SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r<"  end=">[imx]*"  skip="\\\\\|\\>"  contains=@crystalRegexpSpecial,crystalNestedRawAngleBrackets  SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r\[" end="\][imx]*" skip="\\\\\|\\\]" contains=@crystalRegexpSpecial  SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r("  end=")[imx]*"  skip="\\\\\|\\)"  contains=@crystalRegexpSpecial  SynFold '%' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="%r|"  end="|[imx]*"  skip="\\\\\|\\|"  contains=@crystalRegexpSpecial @@ -228,10 +229,10 @@ SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[  SynFold '%' syn region crystalString matchgroup=crystalStringDelimiter start="%[Qx]\=|"  end="|"  skip="\\\\\|\\|"  contains=@crystalStringSpecial,crystalDelimEscape  " Here Document -syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@crystalNotTop -syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@crystalNotTop -syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@crystalNotTop -syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@crystalNotTop +syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=TOP +syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=TOP +syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=TOP +syn region crystalHeredocStart matchgroup=crystalStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=TOP  SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc,@crystalStringSpecial keepend  SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=crystalStringDelimiter end=+^\z1$+ contains=crystalHeredocStart,crystalHeredoc,@crystalStringSpecial keepend @@ -256,8 +257,8 @@ syn match crystalLibDeclaration      "[^[:space:];#]\+"    contained contains=cr  syn match crystalMacroDeclaration    "[^[:space:];#(]\+"   contained contains=crystalFunction  syn match crystalEnumDeclaration     "[^[:space:];#<\"]\+" contained contains=crystalEnumName  syn match crystalFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=crystalMethodDeclaration,crystalFunctionDeclaration -syn match crystalFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=crystalAliasDeclaration,crystalAliasDeclaration2 -syn match crystalFunction "\%([[:space:].]\|^\)\@<=\%(\[\][=?]\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=crystalAliasDeclaration,crystalAliasDeclaration2,crystalMethodDeclaration,crystalFunctionDeclaration +syn match crystalFunction "\%(\s\|^\)\@1<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=crystalAliasDeclaration,crystalAliasDeclaration2 +syn match crystalFunction "\%([[:space:].]\|^\)\@1<=\%(\[\][=?]\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=crystalAliasDeclaration,crystalAliasDeclaration2,crystalMethodDeclaration,crystalFunctionDeclaration  syn cluster crystalDeclaration contains=crystalAliasDeclaration,crystalAliasDeclaration2,crystalMethodDeclaration,crystalFunctionDeclaration,crystalModuleDeclaration,crystalClassDeclaration,crystalStructDeclaration,crystalLibDeclaration,crystalMacroDeclaration,crystalFunction,crystalBlockParameter,crystalTypeDeclaration,crystalEnumDeclaration @@ -285,28 +286,28 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')    syn match crystalMacro  "\<macro\>"  nextgroup=crystalMacroDeclaration skipwhite skipnl    syn match crystalEnum   "\<enum\>"   nextgroup=crystalEnumDeclaration skipwhite skipnl -  SynFold 'def'    syn region crystalMethodBlock start="\<\%(def\|macro\)\>" matchgroup=crystalDefine end="\%(\<\%(def\|macro\)\_s\+\)\@<!\<end\>"  contains=ALLBUT,@crystalNotTop -  SynFold 'class'  syn region crystalBlock       start="\<class\>"           matchgroup=crystalClass  end="\<end\>"                                 contains=ALLBUT,@crystalNotTop -  SynFold 'module' syn region crystalBlock       start="\<module\>"          matchgroup=crystalModule end="\<end\>"                                 contains=ALLBUT,@crystalNotTop -  SynFold 'struct' syn region crystalBlock       start="\<struct\>"          matchgroup=crystalStruct end="\<end\>"                                 contains=ALLBUT,@crystalNotTop -  SynFold 'lib'    syn region crystalBlock       start="\<lib\>"             matchgroup=crystalLib    end="\<end\>"                                 contains=ALLBUT,@crystalNotTop -  SynFold 'enum'   syn region crystalBlock       start="\<enum\>"            matchgroup=crystalEnum   end="\<end\>"                                 contains=ALLBUT,@crystalNotTop +  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    " modifiers    syn match crystalConditionalModifier "\<\%(if\|unless\|ifdef\)\>" display -  syn match crystalRepeatModifier      "\<\%(while\|until\)\>" display -  SynFold 'do' syn region crystalDoBlock matchgroup=crystalControl start="\<do\>" end="\<end\>" contains=ALLBUT,@crystalNotTop +  SynFold 'do' syn region crystalDoBlock matchgroup=crystalControl start="\<do\>" end="\<end\>" contains=TOP    " curly bracket block or hash literal -  SynFold '{' syn region crystalCurlyBlock   matchgroup=crystalCurlyBlockDelimiter start="{"                     end="}" contains=ALLBUT,@crystalNotTop -  SynFold '[' syn region crystalArrayLiteral matchgroup=crystalArrayDelimiter      start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@crystalNotTop +  SynFold '{' syn region crystalCurlyBlock   matchgroup=crystalCurlyBlockDelimiter start="{"                      end="}" contains=TOP +  SynFold '[' syn region crystalArrayLiteral matchgroup=crystalArrayDelimiter      start="\%(\w\|[\]})]\)\@1<!\[" end="]" contains=TOP    " statements without 'do' -  SynFold 'begin'  syn region crystalBlockExpression       matchgroup=crystalControl     start="\<begin\>"  end="\<end\>" contains=ALLBUT,@crystalNotTop -  SynFold 'case'   syn region crystalCaseExpression        matchgroup=crystalConditional start="\<case\>"   end="\<end\>" contains=ALLBUT,@crystalNotTop -  SynFold 'select' syn region crystalSelectExpression      matchgroup=crystalConditional start="\<select\>" end="\<end\>" contains=ALLBUT,@crystalNotTop -  SynFold 'if'     syn region crystalConditionalExpression matchgroup=crystalConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|ifdef\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@crystalNotTop +  SynFold 'begin'  syn region crystalBlockExpression       matchgroup=crystalControl     start="\<begin\>"             end="\<end\>" contains=TOP +  SynFold 'while'  syn region crystalRepeatExpression      matchgroup=crystalRepeat      start="\<\%(while\|until\)\>" end="\<end\>" contains=TOP +  SynFold 'case'   syn region crystalCaseExpression        matchgroup=crystalConditional start="\<case\>"              end="\<end\>" contains=TOP +  SynFold 'select' syn region crystalSelectExpression      matchgroup=crystalConditional start="\<select\>"            end="\<end\>" contains=TOP +  SynFold 'if'     syn region crystalConditionalExpression matchgroup=crystalConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|ifdef\|unless\)\>" end="\%(\%(\%(\.\@1<!\.\)\|::\)\s*\)\@<!\<end\>" contains=TOP    syn match crystalConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=crystalCaseExpression    syn match crystalConditional "\<\%(when\|else\)\>[?!]\@!" contained containedin=crystalSelectExpression @@ -336,10 +337,7 @@ else  endif  " Link attribute -syn region crystalLinkAttrRegion      start="@\[" nextgroup=crystalLinkAttrRegionInner end="]" contains=crystalLinkAttr,crystalLinkAttrRegionInner transparent display oneline -syn region crystalLinkAttrRegionInner start="\%(@\[\)\@<=" end="]\@=" contained contains=ALLBUT,@crystalNotTop transparent display oneline -syn match  crystalLinkAttr            "@\[" contained containedin=crystalLinkAttrRegion display -syn match  crystalLinkAttr            "]" contained containedin=crystalLinkAttrRegion display +syn region crystalLinkAttr matchgroup=crystalLinkAttrDelim start="@\[" end="]" contains=TOP display oneline  " Special Methods  if !exists('g:crystal_no_special_methods') @@ -358,42 +356,56 @@ endif  " Macro  " Note: This definition must be put after crystalNestedCurlyBraces to give higher priority -syn region crystalMacroRegion matchgroup=crystalMacroDelim start="\\\={%" end="%}" oneline display contains=TOP,@crystalExpensive containedin=ALL -syn region crystalMacroRegion matchgroup=crystalMacroDelim start="\\\={{" end="}}" oneline display contains=TOP,@crystalExpensive containedin=ALL +syn region crystalMacroRegion matchgroup=crystalMacroDelim start="\\\={%" end="%}" oneline display contains=@crystalMacroGroup containedin=ALL +syn region crystalMacroRegion matchgroup=crystalMacroDelim start="\\\={{" end="}}" oneline display contains=@crystalMacroGroup containedin=ALL + +" Cluster for groups that can appear inside macro expressions +syn cluster crystalMacroGroup contains=@crystalTop  " Cluster for Expensive Mode groups that can't appear inside macro  " regions  syn cluster crystalExpensive contains= -      \ crystalMethodBlock,crystalBlock,crystalDoBlock,crystalBlockExpression,crystalCaseExpression, -      \ crystalSelectExpression,crystalConditionalExpression +      \ crystalMethodBlock,crystalBlock,crystalDoBlock,crystalBlockExpression,crystalRepeatExpression, +      \ crystalCaseExpression,crystalSelectExpression,crystalConditionalExpression + +syn cluster crystalMacroGroup remove=@crystalExpensive  " Some keywords will have to be redefined for them to be highlighted  " properly -syn keyword crystalMacroKeyword contained containedin=crystalMacroRegion -      \ if else elsif end for in begin do -syn cluster crystalNotTop add=crystalMacroKeyword +syn keyword crystalMacroKeyword contained +      \ if else elsif end for in begin do case when while until loop +      \ rescue ensure + +syn cluster crystalMacroGroup add=crystalMacroKeyword  " Comments and Documentation  syn match   crystalSharpBang "\%^#!.*" display  syn keyword crystalTodo      FIXME NOTE TODO OPTIMIZE XXX todo contained -syn match   crystalComment   "#.*" contains=crystalSharpBang,crystalSpaceError,crystalTodo,@Spell + +if exists('g:main_syntax') && g:main_syntax ==# 'ecrystal' +  " eCrystal tags can contain Crystal comments, so we need to modify the +  " pattern for comments so that it does not consume delimiters +  syn match crystalComment "#.*\ze\%($\|-\=%>\)" contains=crystalSharpBang,crystalSpaceError,crystalTodo,@Spell +else +  syn match crystalComment "#.*" contains=crystalSharpBang,crystalSpaceError,crystalTodo,@Spell +endif  SynFold '#' syn region crystalMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=crystalComment transparent keepend  " Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver -syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\|select\)\>" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|ifdef\|in\|module\|next\|nil\)\>" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(rescue\|return\|self\|super\|previous_def\|then\|true\)\>" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|with\|__FILE__\|__LINE__\)\>" transparent contains=NONE +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\|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 "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|caller\|exit\)\>" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fork\|include\|asm\)\>" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(loop\|private\|protected\)\>" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(require\|raise\)\>" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(typeof\|pointerof\|sizeof\|instance_sizeof\|\)\>" 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  hi def link crystalClass               crystalDefine  hi def link crystalModule              crystalDefine @@ -407,7 +419,6 @@ hi def link crystalConditional         Conditional  hi def link crystalConditionalModifier crystalConditional  hi def link crystalExceptional         crystalConditional  hi def link crystalRepeat              Repeat -hi def link crystalRepeatModifier      crystalRepeat  hi def link crystalControl             Statement  hi def link crystalInclude             Include  hi def link crystalRecord              Statement @@ -465,7 +476,7 @@ hi def link crystalRegexp               crystalString  hi def link crystalMacro                PreProc  hi def link crystalMacroDelim           crystalMacro  hi def link crystalMacroKeyword         crystalKeyword -hi def link crystalLinkAttr             crystalMacro +hi def link crystalLinkAttrDelim        crystalMacro  hi def link crystalError                Error  hi def link crystalInvalidVariable      crystalError  hi def link crystalSpaceError           crystalError diff --git a/syntax/dart.vim b/syntax/dart.vim index 103b1da2..6c89e099 100644 --- a/syntax/dart.vim +++ b/syntax/dart.vim @@ -5,14 +5,14 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1  " for details. All rights reserved. Use of this source code is governed by a  " BSD-style license that can be found in the LICENSE file. -if !exists("g:main_syntax") -  if version < 600 +if !exists('g:main_syntax') +  if v:version < 600      syntax clear -  elseif exists("b:current_syntax") +  elseif exists('b:current_syntax')      finish    endif    let g:main_syntax = 'dart' -  syntax region dartFold start="{" end="}" transparent fold +  syntax region dartFold start='{' end='}' transparent fold  endif  " Ensure long multiline strings are highlighted. @@ -25,7 +25,7 @@ syntax keyword dartConditional    if else switch  syntax keyword dartRepeat         do while for  syntax keyword dartBoolean        true false  syntax keyword dartConstant       null -syntax keyword dartTypedef        this super class typedef enum mixin +syntax keyword dartTypedef        this super class typedef enum mixin extension  syntax keyword dartOperator       new is as in  syntax match   dartOperator       "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~\|?\|:"  syntax keyword dartCoreType       void var dynamic @@ -42,9 +42,9 @@ syntax match   dartUserLabelRef   "\k\+" contained  syntax region  dartLabelRegion   transparent matchgroup=dartLabel start="\<case\>" matchgroup=NONE end=":"  syntax keyword dartLabel         default -syntax match   dartLibrary       "^\(import\|export\)\>" nextgroup=dartUri skipwhite -syntax region  dartUri           contained start=+r\=\z(["']\)+ end=+\z1+ nextgroup=dartCombinators skipwhite -syntax region  dartCombinators   contained start="" end=";" contains=dartCombinator +syntax match   dartLibrary       "^\(import\|export\)\>" nextgroup=dartUri skipwhite skipnl +syntax region  dartUri           contained start=+r\=\z(["']\)+ end=+\z1+ nextgroup=dartCombinators skipwhite skipnl +syntax region  dartCombinators   contained start="" end=";" contains=dartCombinator,dartComment,dartLineComment  syntax keyword dartCombinator    contained show hide deferred as  syntax match   dartLibrary       "^\(library\|part of\|part\)\>" @@ -136,8 +136,8 @@ highlight default link dartUserType        dartType  highlight default link dartType            Type  highlight default link dartFunction        Function -let b:current_syntax = "dart" -let b:spell_options = "contained" +let b:current_syntax = 'dart' +let b:spell_options = 'contained'  if g:main_syntax is# 'dart'    unlet g:main_syntax diff --git a/syntax/ecrystal.vim b/syntax/ecrystal.vim new file mode 100644 index 00000000..096990ff --- /dev/null +++ b/syntax/ecrystal.vim @@ -0,0 +1,37 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 + +if &syntax !~# '\<ecrystal\>' || get(b:, 'current_syntax') =~# '\<ecrystal\>' +  finish +endif + +if !exists('main_syntax') +  let main_syntax = 'ecrystal' +endif + +call ecrystal#SetSubtype() + +if b:ecrystal_subtype !=# '' +  exec 'runtime! syntax/'.b:ecrystal_subtype.'.vim' +  unlet! b:current_syntax +endif + +syn include @crystalTop syntax/crystal.vim + +syn cluster ecrystalRegions contains=ecrystalControl,ecrystalRender,ecrystalComment + +syn region ecrystalControl matchgroup=ecrystalDelimiter start="<%%\@!-\="  end="-\=%>" display contains=@crystalTop        containedin=ALLBUT,@ecrystalRegions +syn region ecrystalRender  matchgroup=ecrystalDelimiter start="<%%\@!-\==" end="-\=%>" display contains=@crystalTop        containedin=ALLBUT,@ecrystalRegions +syn region ecrystalComment matchgroup=ecrystalDelimiter start="<%%\@!-\=#" end="-\=%>" display contains=crystalTodo,@Spell containedin=ALLBUT,@ecrystalRegions + +" Define the default highlighting. + +hi def link ecrystalDelimiter PreProc +hi def link ecrystalComment   crystalComment + +let b:current_syntax = 'ecrystal' + +if exists('main_syntax') && main_syntax ==# 'ecrystal' +  unlet main_syntax +endif + +endif diff --git a/syntax/elixir.vim b/syntax/elixir.vim index 054ddd3e..ca057b3d 100644 --- a/syntax/elixir.vim +++ b/syntax/elixir.vim @@ -20,6 +20,10 @@ syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained  syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' contains=elixirUnusedVariable +syn match elixirFunctionCall '\<[a-z_]\w*[!?]\?\(\s*\.\?\s*(\|\s\+[a-zA-Z0-9@:\'\"\[]\)\@=' +syn match elixirFunctionCall '\(:\w\+\s*\.\s*\|[A-Z]\w*\s*\.\s*\)\@<=[a-z_]\w*[!?]\?' +syn match elixirFunctionCall '\(>\s+\)\<[a-z_]\w*[!?]\?' +  syn match elixirKeyword '\(\.\)\@<!\<\(for\|case\|when\|with\|cond\|if\|unless\|try\|receive\|after\|raise\|rescue\|catch\|else\|quote\|unquote\|super\|unquote_splicing\)\>:\@!'  syn keyword elixirInclude import require alias use @@ -40,6 +44,7 @@ syn match   elixirOperator '|||\|||\||>\||'  syn match   elixirOperator '\.\.\|\.'  syn match   elixirOperator "\^\^\^\|\^"  syn match   elixirOperator '\\\\\|::\|\*\|/\|\~\~\~\|@' +syn match   elixirOperator '\~>\|\~>>\|<\~\|<<\~\|<\~>'  syn match   elixirAlias '\([a-z]\)\@<![A-Z]\w*\%(\.[A-Z]\w*\)*' diff --git a/syntax/go.vim b/syntax/go.vim index fef0e689..93d6fbc4 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -401,7 +401,7 @@ function! s:hi()    " filetype plugin on, the highlight groups won't be defined when    " ftplugin/go.vim is executed when the first go file is opened.    " See https://github.com/fatih/vim-go/issues/2658. -  if exists('*prop_type_add') +  if has('textprop')      if empty(prop_type_get('goSameId'))        call prop_type_add('goSameId', {'highlight': 'goSameId'})      endif diff --git a/syntax/graphql.vim b/syntax/graphql.vim index 9cfac1a6..6ccbf03f 100644 --- a/syntax/graphql.vim +++ b/syntax/graphql.vim @@ -1,6 +1,6 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 -" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org> +" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org>  "  " Permission is hereby granted, free of charge, to any person obtaining a copy  " of this software and associated documentation files (the "Software"), to @@ -24,7 +24,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1  " Maintainer: Jon Parise <jon@indelible.org>  if exists('b:current_syntax') -    finish +  finish  endif  syn case match diff --git a/syntax/i3config.vim b/syntax/i3config.vim index 518cd93a..3b36d107 100644 --- a/syntax/i3config.vim +++ b/syntax/i3config.vim @@ -69,9 +69,9 @@ syn match i3ConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=i3Con  syn match i3ConfigNumber /\s\d\+/ contained  syn match i3ConfigUnit /\sp\(pt\|x\)/ contained  syn match i3ConfigUnitOr /\sor/ contained -syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps contained +syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps border contained  syn match i3ConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained -syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword +syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword,i3ConfigBorderStyleKeyword  " Floating  syn keyword i3ConfigSizeSpecial x contained @@ -90,7 +90,7 @@ syn match i3ConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\  " Border style  syn keyword i3ConfigBorderStyleKeyword none normal pixel contained -syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,i3ConfigNumber +syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\(\s\+\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,i3ConfigNumber,i3ConfigVariable  " Hide borders and edges  syn keyword i3ConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained diff --git a/syntax/javascript.vim b/syntax/javascript.vim index 0ffc5aa1..e2a25ceb 100644 --- a/syntax/javascript.vim +++ b/syntax/javascript.vim @@ -186,7 +186,7 @@ syntax match   jsClassNoise             contained /\./  syntax match   jsClassFuncName          contained /\<\K\k*\ze\s*[(<]/ skipwhite skipempty nextgroup=jsFuncArgs,jsFlowClassFunctionGroup  syntax match   jsClassMethodType        contained /\<\%([gs]et\|static\)\ze\s\+\K\k*/ skipwhite skipempty nextgroup=jsAsyncKeyword,jsClassFuncName,jsClassProperty  syntax region  jsClassDefinition                  start=/\<class\>/ end=/\(\<extends\>\s\+\)\@<!{\@=/ contains=jsClassKeyword,jsExtendsKeyword,jsClassNoise,@jsExpression,jsFlowClassGroup skipwhite skipempty nextgroup=jsCommentClass,jsClassBlock,jsFlowClassGroup -syntax match   jsClassProperty          contained /\<\K\k*\ze\s*=/ skipwhite skipempty nextgroup=jsClassValue,jsFlowClassDef +syntax match   jsClassProperty          contained /\<\K\k*\ze\s*[=;]/ skipwhite skipempty nextgroup=jsClassValue,jsFlowClassDef  syntax region  jsClassValue             contained start=/=/ end=/\_[;}]\@=/ contains=@jsExpression  syntax region  jsClassPropertyComputed  contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsFuncArgs,jsClassValue extend  syntax region  jsClassStringKey         contained start=+\z(["']\)+  skip=+\\\%(\z1\|$\)+  end=+\z1\|$+  contains=jsSpecial,@Spell extend skipwhite skipempty nextgroup=jsFuncArgs diff --git a/syntax/meson.vim b/syntax/meson.vim index 9451fae3..61dedd60 100644 --- a/syntax/meson.vim +++ b/syntax/meson.vim @@ -35,7 +35,7 @@ set cpo&vim  " http://mesonbuild.com/Syntax.html  syn keyword mesonConditional	elif else if endif  syn keyword mesonRepeat	foreach endforeach -syn keyword mesonOperator	and not or +syn keyword mesonOperator	and not or in  syn match   mesonComment	"#.*$" contains=mesonTodo,@Spell  syn keyword mesonTodo		FIXME NOTE NOTES TODO XXX contained diff --git a/syntax/plantuml.vim b/syntax/plantuml.vim index f3ebfaee..3968f7dd 100644 --- a/syntax/plantuml.vim +++ b/syntax/plantuml.vim @@ -39,16 +39,16 @@ syntax keyword plantumlTypeKeyword concise robust  " Since "syntax keyword" can handle only words, "top to bottom direction" is excluded.  syntax keyword plantumlKeyword accross activate again allow_mixing allowmixing also alt as autonumber bottom  syntax keyword plantumlKeyword box break caption center create critical deactivate destroy down else elseif end -syntax keyword plantumlKeyword endif endwhile footbox footer fork group header hide hnote if is kill left in at are to the and +syntax keyword plantumlKeyword endif endwhile footbox footer fork group header hide hnote if is kill left  syntax keyword plantumlKeyword legend link loop mainframe namespace newpage note of on opt order over package  syntax keyword plantumlKeyword page par partition ref repeat return right rnote rotate show skin skinparam -syntax keyword plantumlKeyword start stop title top up while +syntax keyword plantumlKeyword split start stereotype stop title top up while  "}}}  " Not in 'java - jar plantuml.jar - language' results -syntax keyword plantumlKeyword endlegend split sprite then +syntax keyword plantumlKeyword endlegend sprite then  " gantt  syntax keyword plantumlTypeKeyword project monday tuesday wednesday thursday friday saturday sunday -syntax keyword plantumlKeyword starts ends start end closed day after colored lasts happens +syntax keyword plantumlKeyword starts ends start end closed day after colored lasts happens in at are to the and  syntax keyword plantumlCommentTODO XXX TODO FIXME NOTE contained @@ -278,7 +278,7 @@ syntax keyword plantumlSkinparamKeyword ParticipantStereotypeFontName Participan  syntax keyword plantumlSkinparamKeyword ParticipantStereotypeFontStyle PartitionBackgroundColor PartitionBorderColor  syntax keyword plantumlSkinparamKeyword PartitionBorderThickness PartitionFontColor PartitionFontName PartitionFontSize  syntax keyword plantumlSkinparamKeyword PartitionFontStyle PathHoverColor QueueBackgroundColor QueueBorderColor -syntax keyword plantumlSkinparamKeyword QueueFontColor QueueFontName QueueFontSize QueueFontStyle +syntax keyword plantumlSkinparamKeyword QueueBorderThickness QueueFontColor QueueFontName QueueFontSize QueueFontStyle  syntax keyword plantumlSkinparamKeyword QueueStereotypeFontColor QueueStereotypeFontName QueueStereotypeFontSize  syntax keyword plantumlSkinparamKeyword QueueStereotypeFontStyle Ranksep RectangleBackgroundColor RectangleBorderColor  syntax keyword plantumlSkinparamKeyword RectangleBorderThickness RectangleFontColor RectangleFontName RectangleFontSize @@ -310,9 +310,8 @@ syntax keyword plantumlSkinparamKeyword SequenceReferenceBorderThickness Sequenc  syntax keyword plantumlSkinparamKeyword SequenceReferenceFontName SequenceReferenceFontSize SequenceReferenceFontStyle  syntax keyword plantumlSkinparamKeyword SequenceReferenceHeaderBackgroundColor SequenceStereotypeFontColor  syntax keyword plantumlSkinparamKeyword SequenceStereotypeFontName SequenceStereotypeFontSize -syntax keyword plantumlSkinparamKeyword SequenceStereotypeFontStyle SequenceTitleFontColor SequenceTitleFontName -syntax keyword plantumlSkinparamKeyword SequenceTitleFontSize SequenceTitleFontStyle Shadowing StackBackgroundColor -syntax keyword plantumlSkinparamKeyword StackBorderColor StackFontColor StackFontName StackFontSize StackFontStyle +syntax keyword plantumlSkinparamKeyword SequenceStereotypeFontStyle Shadowing StackBackgroundColor StackBorderColor +syntax keyword plantumlSkinparamKeyword StackFontColor StackFontName StackFontSize StackFontStyle  syntax keyword plantumlSkinparamKeyword StackStereotypeFontColor StackStereotypeFontName StackStereotypeFontSize  syntax keyword plantumlSkinparamKeyword StackStereotypeFontStyle StateAttributeFontColor StateAttributeFontName  syntax keyword plantumlSkinparamKeyword StateAttributeFontSize StateAttributeFontStyle StateBackgroundColor diff --git a/syntax/python.vim b/syntax/python.vim index 13b8d74e..101dbc2f 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -43,11 +43,6 @@ call s:EnableByDefault('g:python_highlight_builtin_funcs_kwarg')  if s:Enabled('g:python_highlight_all')      call s:EnableByDefault('g:python_highlight_builtins') -    if s:Enabled('g:python_highlight_builtins') -        call s:EnableByDefault('g:python_highlight_builtin_objs') -        call s:EnableByDefault('g:python_highlight_builtin_funcs') -        call s:EnableByDefault('g:python_highlight_builtin_types') -    endif      call s:EnableByDefault('g:python_highlight_exceptions')      call s:EnableByDefault('g:python_highlight_string_formatting')      call s:EnableByDefault('g:python_highlight_string_format') @@ -61,6 +56,12 @@ if s:Enabled('g:python_highlight_all')      call s:EnableByDefault('g:python_highlight_operators')  endif +if s:Enabled('g:python_highlight_builtins') +    call s:EnableByDefault('g:python_highlight_builtin_objs') +    call s:EnableByDefault('g:python_highlight_builtin_funcs') +    call s:EnableByDefault('g:python_highlight_builtin_types') +endif +  "  " Function calls  " diff --git a/syntax/racket.vim b/syntax/racket.vim index e7b0600a..8bd46a88 100644 --- a/syntax/racket.vim +++ b/syntax/racket.vim @@ -38,7 +38,8 @@ syn keyword racketSyntax define define-values define-syntax define-syntaxes  syn keyword racketSyntax define-for-syntax define-require-syntax define-provide-syntax  syn keyword racketSyntax define-syntax-rule  syn keyword racketSyntax define-record-type -syn keyword racketSyntax begin begin0 begin-for-syntax +syn keyword racketSyntax begin begin0 +syn keyword racketSyntax begin-for-syntax  syn keyword racketSyntax when unless  syn keyword racketSyntax set! set!-values  syn keyword racketSyntax for for/list for/vector for/hash for/hasheq for/hasheqv diff --git a/syntax/razor.vim b/syntax/razor.vim index af18d75c..63c08cf3 100644 --- a/syntax/razor.vim +++ b/syntax/razor.vim @@ -52,5 +52,4 @@ hi def link rNamespace Type  let b:current_syntax = "razor" -  endif diff --git a/syntax/tmux.vim b/syntax/tmux.vim index f9bd92d5..f2e3f3e1 100644 --- a/syntax/tmux.vim +++ b/syntax/tmux.vim @@ -1,7 +1,7 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tmux') == -1  " Language: tmux(1) configuration file -" Version: 3.0 (git-48cbbb87) +" Version: 3.1 (git-f986539e)  " URL: https://github.com/ericpruitt/tmux.vim/  " Maintainer: Eric Pruitt <eric.pruitt@gmail.com>  " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) @@ -39,7 +39,7 @@ syn region tmuxString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end='$'  " TODO: Figure out how escaping works inside of #(...) and #{...} blocks.  syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend -syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ contained keepend +syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ keepend  syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend  hi def link tmuxFormatString      Identifier @@ -94,25 +94,26 @@ syn keyword tmuxCommands  \ attach attach-session bind bind-key break-pane breakp capture-pane  \ capturep choose-buffer choose-client choose-tree clear-history clearhist  \ clock-mode command-prompt confirm confirm-before copy-mode detach -\ detach-client display display-menu display-message display-panes displayp -\ find-window findw if if-shell join-pane joinp kill-pane kill-server -\ kill-session kill-window killp has-session has killw link-window linkw -\ list-buffers list-clients list-commands list-keys list-panes list-sessions -\ list-windows load-buffer loadb lock lock-client lock-server lock-session -\ lockc last-pane lastp locks ls last-window last lsb lsc delete-buffer -\ deleteb lscm lsk lsp lsw menu move-pane move-window movep movew new -\ new-session new-window neww next next-layout next-window nextl -\ paste-buffer pasteb pipe-pane pipep prev previous-layout previous-window -\ prevl refresh refresh-client rename rename-session rename-window renamew -\ resize-pane resize-window resizep resizew respawn-pane respawn-window -\ respawnp respawnw rotate-window rotatew run run-shell save-buffer saveb -\ select-layout select-pane select-window selectl selectp selectw send -\ send-keys send-prefix set set-buffer set-environment set-hook set-option -\ set-window-option setb setenv setw show show-buffer show-environment -\ show-hooks show-messages show-options show-window-options showb showenv -\ showmsgs showw source source-file split-window splitw start start-server -\ suspend-client suspendc swap-pane swap-window swapp swapw switch-client -\ switchc unbind unbind-key unlink-window unlinkw wait wait-for +\ detach-client display display-menu display-message display-panes +\ display-popup displayp find-window findw if if-shell join-pane joinp +\ kill-pane kill-server kill-session kill-window killp has-session has killw +\ link-window linkw list-buffers list-clients list-commands list-keys +\ list-panes list-sessions list-windows load-buffer loadb lock lock-client +\ lock-server lock-session lockc last-pane lastp locks ls last-window last +\ lsb lsc delete-buffer deleteb lscm lsk lsp lsw menu move-pane move-window +\ movep movew new new-session new-window neww next next-layout next-window +\ nextl paste-buffer pasteb pipe-pane pipep popup prev previous-layout +\ previous-window prevl refresh refresh-client rename rename-session +\ rename-window renamew resize-pane resize-window resizep resizew +\ respawn-pane respawn-window respawnp respawnw rotate-window rotatew run +\ run-shell save-buffer saveb select-layout select-pane select-window +\ selectl selectp selectw send send-keys send-prefix set set-buffer +\ set-environment set-hook set-option set-window-option setb setenv setw +\ show show-buffer show-environment show-hooks show-messages show-options +\ show-window-options showb showenv showmsgs showw source source-file +\ split-window splitw start start-server suspend-client suspendc swap-pane +\ swap-window swapp swapw switch-client switchc unbind unbind-key +\ unlink-window unlinkw wait wait-for  let &cpo = s:original_cpo  unlet! s:original_cpo s:bg s:i diff --git a/syntax/vifm.vim b/syntax/vifm.vim index 68a20164..e8f9892f 100644 --- a/syntax/vifm.vim +++ b/syntax/vifm.vim @@ -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: July 12, 2019 +" Last Change: March 7, 2020  " Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.  if exists('b:current_syntax') @@ -23,8 +23,8 @@ syntax keyword vifmCommand contained  		\ mes[sages] mkdir m[ove] noh[lsearch] on[ly] popd pushd pu[t] pw[d] qa[ll]  		\ q[uit] redr[aw] reg[isters] regular rename restart restore rlink screen  		\ sh[ell] siblnext siblprev sor[t] sp[lit] s[ubstitute] tabc[lose] tabm[ove] -		\ tabname tabnew tabn[ext] tabp[revious] touch tr trashes tree sync -		\ undol[ist] ve[rsion] vie[w] vifm vs[plit] winc[md] w[rite] wq wqa[ll] +		\ tabname tabnew tabn[ext] tabo[nly] tabp[revious] touch tr trashes tree +		\ sync undol[ist] ve[rsion] vie[w] vifm vs[plit] winc[md] w[rite] wq wqa[ll]  		\ xa[ll] x[it] y[ank]  		\ nextgroup=vifmArgs  syntax keyword vifmCommandCN contained diff --git a/syntax/zig.vim b/syntax/zig.vim index 2ee57a1b..9af783c6 100644 --- a/syntax/zig.vim +++ b/syntax/zig.vim @@ -29,21 +29,20 @@ syn match zigType "\v<[iu][1-9]\d*>"  syn match zigOperator display "\%(+%\?\|-%\?\|/\|*%\?\|=\|\^\|&\|?\||\|!\|>\|<\|%\|<<%\?\|>>\)=\?"  syn match zigArrowCharacter display "->" -syn match zigBuiltinFn "\v\@(addWithOverflow|ArgType|atomicLoad|atomicStore|bitCast|breakpoint)>" +syn match zigBuiltinFn "\v\@(addWithOverflow|as|atomicLoad|atomicStore|bitCast|breakpoint)>"  syn match zigBuiltinFn "\v\@(alignCast|alignOf|cDefine|cImport|cInclude)>"  syn match zigBuiltinFn "\v\@(cUndef|canImplicitCast|clz|cmpxchgWeak|cmpxchgStrong|compileError)>"  syn match zigBuiltinFn "\v\@(compileLog|ctz|popCount|divExact|divFloor|divTrunc)>"  syn match zigBuiltinFn "\v\@(embedFile|export|tagName|TagType|errorName|call)>"  syn match zigBuiltinFn "\v\@(errorReturnTrace|fence|fieldParentPtr|field|unionInit)>" -syn match zigBuiltinFn "\v\@(frameAddress|import|newStackCall|asyncCall|intToPtr|IntType)>" -syn match zigBuiltinFn "\v\@(memberCount|memberName|memberType|as)>" +syn match zigBuiltinFn "\v\@(frameAddress|import|newStackCall|asyncCall|intToPtr)>"  syn match zigBuiltinFn "\v\@(memcpy|memset|mod|mulWithOverflow|splat)>"  syn match zigBuiltinFn "\v\@(bitOffsetOf|byteOffsetOf|OpaqueType|panic|ptrCast)>"  syn match zigBuiltinFn "\v\@(ptrToInt|rem|returnAddress|setCold|Type|shuffle)>"  syn match zigBuiltinFn "\v\@(setRuntimeSafety|setEvalBranchQuota|setFloatMode)>"  syn match zigBuiltinFn "\v\@(setGlobalLinkage|setGlobalSection|shlExact|This|hasDecl|hasField)>"  syn match zigBuiltinFn "\v\@(shlWithOverflow|shrExact|sizeOf|bitSizeOf|sqrt|byteSwap|subWithOverflow|intCast|floatCast|intToFloat|floatToInt|boolToInt|errSetCast)>" -syn match zigBuiltinFn "\v\@(truncate|typeId|typeInfo|typeName|TypeOf|atomicRmw|bytesToSlice|sliceToBytes)>" +syn match zigBuiltinFn "\v\@(truncate|typeInfo|typeName|TypeOf|atomicRmw|bytesToSlice|sliceToBytes)>"  syn match zigBuiltinFn "\v\@(intToError|errorToInt|intToEnum|enumToInt|setAlignStack|frame|Frame|frameSize|bitReverse|Vector)>"  syn match zigBuiltinFn "\v\@(sin|cos|exp|exp2|log|log2|log10|fabs|floor|ceil|trunc|round)>" | 
