|
| 1 | +diff --git a/syntax/python.vim b/syntax/python.vim |
| 2 | +index 2524aba..3d49f51 100644 |
| 3 | +--- a/syntax/python.vim |
| 4 | ++++ b/syntax/python.vim |
| 5 | +@@ -81,6 +81,7 @@ if s:Enabled('g:python_highlight_class_vars') |
| 6 | + endif |
| 7 | + syn keyword pythonRepeat for while |
| 8 | + syn keyword pythonConditional if elif else |
| 9 | ++syn keyword pythonMatch match case |
| 10 | + syn keyword pythonException try except finally |
| 11 | + " The standard pyrex.vim unconditionally removes the pythonInclude group, so |
| 12 | + " we provide a dummy group here to avoid crashing pyrex.vim. |
| 13 | +@@ -105,7 +106,7 @@ else |
| 14 | + syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite |
| 15 | + syn match pythonStatement '\<async\s\+with\>' |
| 16 | + syn match pythonStatement '\<async\s\+for\>' |
| 17 | +- 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 |
| 18 | ++ 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 |
| 19 | + endif |
| 20 | + |
| 21 | + |
| 22 | +@@ -434,6 +435,7 @@ if v:version >= 508 || !exists('did_python_syn_inits') |
| 23 | + HiLink pythonFunction Function |
| 24 | + HiLink pythonFunctionCall Function |
| 25 | + HiLink pythonConditional Conditional |
| 26 | ++ HiLink pythonMatch Conditional |
| 27 | + HiLink pythonRepeat Repeat |
| 28 | + HiLink pythonException Exception |
| 29 | + HiLink pythonOperator Operator |
| 30 | + |
0 commit comments