Closed cdce8p closed 3 years ago
Thanks for the report; at the moment we rely on the TextMate profile built into VS Code to display these kinds of keywords. I'm surprised they haven't been added there, but I do think we should be emitting keywords as tokens in the semantic highlighter as well.
After searching a bit more, I found these two existing issues: https://github.com/microsoft/vscode/issues/120734 https://github.com/MagicStack/MagicPython/issues/235
I've also opened a PR https://github.com/MagicStack/MagicPython/pull/237 to recognize match
and case
as keywords, at least in a match
statement.
In the meantime while we wait for VS Code and such to pull in those changes, I've modified our semantic tokenizer to output match
and case
as keyword tokens:
@jakebailey That's great! Thanks 🚀
This issue has been fixed in version 2021.5.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202150-5-may-2021
For people using pyright
extension for development of it I think there's no other workaround than using a MagicPython
extension built from the PR branch (rebased or not).
default themes and github themes support match
case
syntax, however majority of other themes does not support them out of the box.
running Inspect editor tokens and scopes
shows result like this:
could there be any way to overwrite custom themes to support match
case
?
(using editor.tokenColorCustomizations
for every single themes would too much work)
@scarf005, this issue has been closed for a long time. Please open a new issue for your suggestion.
@scarf005, this issue has been closed for a long time. Please open a new issue for your suggestion.
alright, referenced in new issue.
It would be nice if syntax highlighting for
match
andcase
could be added.