diff --git a/match.patch b/match.patch new file mode 100644 index 0000000..4a73284 --- /dev/null +++ b/match.patch @@ -0,0 +1,30 @@ +diff --git a/syntax/python.vim b/syntax/python.vim +index 2524aba..3d49f51 100644 +--- a/syntax/python.vim ++++ b/syntax/python.vim +@@ -81,6 +81,7 @@ if s:Enabled('g:python_highlight_class_vars') + endif + syn keyword pythonRepeat for while + syn keyword pythonConditional if elif else ++syn keyword pythonMatch match case + syn keyword pythonException try except finally + " The standard pyrex.vim unconditionally removes the pythonInclude group, so + " we provide a dummy group here to avoid crashing pyrex.vim. +@@ -105,7 +106,7 @@ else + syn match pythonStatement '\' nextgroup=pythonFunction skipwhite + syn match pythonStatement '\' + syn match pythonStatement '\' +- syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonFString,pythonRawString,pythonRawFString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType,pythonClassVar ++ syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonMatch,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonFString,pythonRawString,pythonRawFString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType,pythonClassVar + endif + + +@@ -434,6 +435,7 @@ if v:version >= 508 || !exists('did_python_syn_inits') + HiLink pythonFunction Function + HiLink pythonFunctionCall Function + HiLink pythonConditional Conditional ++ HiLink pythonMatch Conditional + HiLink pythonRepeat Repeat + HiLink pythonException Exception + HiLink pythonOperator Operator + diff --git a/syntax/python.vim b/syntax/python.vim index 2524aba..3d49f51 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -81,6 +81,7 @@ if s:Enabled('g:python_highlight_class_vars') endif syn keyword pythonRepeat for while syn keyword pythonConditional if elif else +syn keyword pythonMatch match case syn keyword pythonException try except finally " The standard pyrex.vim unconditionally removes the pythonInclude group, so " we provide a dummy group here to avoid crashing pyrex.vim. @@ -105,7 +106,7 @@ else syn match pythonStatement '\' nextgroup=pythonFunction skipwhite syn match pythonStatement '\' syn match pythonStatement '\' - syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonFString,pythonRawString,pythonRawFString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType,pythonClassVar + syn cluster pythonExpression contains=pythonStatement,pythonRepeat,pythonConditional,pythonMatch,pythonOperator,pythonNumber,pythonHexNumber,pythonOctNumber,pythonBinNumber,pythonFloat,pythonString,pythonFString,pythonRawString,pythonRawFString,pythonBytes,pythonBoolean,pythonNone,pythonSingleton,pythonBuiltinObj,pythonBuiltinFunc,pythonBuiltinType,pythonClassVar endif @@ -434,6 +435,7 @@ if v:version >= 508 || !exists('did_python_syn_inits') HiLink pythonFunction Function HiLink pythonFunctionCall Function HiLink pythonConditional Conditional + HiLink pythonMatch Conditional HiLink pythonRepeat Repeat HiLink pythonException Exception HiLink pythonOperator Operator