vim-python / python-syntax

Python syntax highlighting for Vim
MIT License
438 stars 84 forks source link

Add support for match expression #91

Open mdomke opened 2 years ago

mdomke commented 2 years ago

This is based on the work of @g15ecb

https://github.com/g15ecb/python-syntax/commit/988efe9edcfeed9e762102fcb315a4fd47db4c00

lukelbd commented 2 years ago

Have been using this for a while (copy-pasted your syntax file). Works fine for me so far.

lukelbd commented 2 years ago

Seems to need approval from @nfnty?

cdonovick commented 1 year ago

I have an alternate version of this https://github.com/vim-python/python-syntax/commit/5d79f24dfe2b629f123cdfca74707d98c8dc03e4

Mine is slightly more expensive as it avoids highlighting non keyword versions of the match case.

One note on this PR is that match / case should not appear in the pythonExpression cluster. pythonExpression is exclusively used by fstring highlighting and there is no expression form of match.