Skip to content

Add new exceptions #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add support for match expression
This is based on the work of [@g15ecb](https://github.com/g15ecb)

g15ecb@988efe9
  • Loading branch information
mdomke authored and Abrosimov-a-a committed Nov 18, 2022
commit aaf6ad6aff7c2ed9c76184c667053c018d77e868
4 changes: 3 additions & 1 deletion syntax/python.vim
Original file line number Diff line number Diff line change
@@ -82,6 +82,7 @@ endif
syn keyword pythonRepeat for while
syn keyword pythonConditional if elif else
syn keyword pythonException try except finally
syn keyword pythonMatch match case
" The standard pyrex.vim unconditionally removes the pythonInclude group, so
" we provide a dummy group here to avoid crashing pyrex.vim.
syn keyword pythonInclude import
@@ -105,7 +106,7 @@ else
syn match pythonStatement '\<async\s\+def\>' nextgroup=pythonFunction skipwhite
syn match pythonStatement '\<async\s\+with\>'
syn match pythonStatement '\<async\s\+for\>'
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