python-syntax icon indicating copy to clipboard operation
python-syntax copied to clipboard

Suggestion: Add separate syntax group for async etc.

Open MisanthropicBit opened this issue 4 years ago • 0 comments
trafficstars

First of all, thanks for this awesome project. Really spiced up my Python files!

I was wondering if there are any plans to have separate syntax groups for async and friends? Something like:

syn match   pythonAsyncStatement   '\<\zsasync\ze\s\+def\>' nextgroup=pythonFunction skipwhite
syn match   pythonAsyncStatement   '\<\zsasync\ze\s\+with\>'
syn match   pythonAsyncStatement   '\<\zsasync\ze\s\+for\>'

The benefit would be that colorschemes could bring extra attention to asynchronous statements if they wanted to. By default, pythonAsyncStatement could link to pythonStatement to achieve the current behaviour.

EDIT: I would be happy to submit a pull request.

MisanthropicBit avatar Jan 08 '21 09:01 MisanthropicBit