idea-return-highlighter
idea-return-highlighter copied to clipboard
Support yield keyword
I would like to see yield
keyword support for Python, Javascript and Typescript generators.
Note that Javascript also has yield*
for async generators. Other languages having iterators/generators (for example C#, Rust, PHP) may also enjoy having this implemented.
In order to increase compatibility and reduce noise, the yield
keyword highlighting may be added as an optional feature, disabled by default, that can be enabled with a checkbox in settings. It would be also nice to have a separate color choice option (with an option to inherit color from the return
one).
Creating a separate plugin-sibling for yield
, instead of adding this functionality into current plugin, may be an option too.
References:
- Python docs - yield
- MDN - yield
- MDN - yield*
- C# reference - yield
- Rust - generators
- PHP - Generator syntax
Thanks for this great plugin!
Started working on it. Will be ready by end of week if no strange problems arises.
Oh btw, C# support is in backlog. No idea if I will ever support it...