-
Notifications
You must be signed in to change notification settings - Fork 769
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
switch to a different tool for python syntax highlighting #5824
Comments
Thanks for the issue. We actually have an internal issue already tracking this: https://github.com/microsoft/pyrx/issues/4026, but we can use this issue as the external facing problem. |
Just noting that this part isn't true; Black does not convert between |
i see this issue was moved to the pylance repo. from my understanding the syntax highlighting provided by magicpython is bundled with vscode and separate to the semantic highlighting provided by pylance. is the plan to remove that basic syntax highlighting entirely and instead have it handled entirely by pylance? if so, it would be a downgrade for users who are not using pylance (eg. vscodium/basedpyright users) |
The plan is to fix the colors of text in Python code. We haven't really started investigating how or where we'd implement such a thing, but we realize the textmate solution that uses MagicPython's tmlanguage isn't really working out. |
VS Code is exploring using Tree-sitter for syntax highlighting. If they move forward with that, the current thinking is that each language could choose either TextMate or Tree-sitter depending on which implementation is more up-to-date / better maintained -- microsoft/vscode#210475 For internal people, there was a discussion about this work at the beginning of the 4/30 "Language Teams and LSP Weekly Sync" meeting. |
did we drop the idea of supplying textmate rule in pylance rather than using one supplied by vscode? |
No, I think that's still on the table. Although Dirk mentioned in the LSP sync that fixing bugs / enhancing existing TextMate grammars can be incredibly painful. |
What is the ETA on getting these issues fixed? The no syntax highlighting on type definitions and generics is really a thorn in my side 😋 |
I checked in with vscode on microsoft/vscode#210475. There is no extension contribution story yet. Our hope is that using tree-sitter will greatly simplify our syntax highlighting approach (vs TextMate), and therefore we are postponing work on syntax highlighting until vscode's tree-sitter experiment is further along. |
MagicPython doesn't seem to have been updated in 2 years, meaning it doesn't support any of the new syntax in python 3.12:
it seems very odd that these new features came out 6 months ago and are still not supported properly in vscode.
there's also the issue with raw strings being incorrectly treated as regex which has been raised many times:
i think this is a big source of confusion for users (as you can see from how many times it's been raised), and should be addressed. i think @gilbertohasnofb makes a good argument in MagicStack/MagicPython#259 (comment):
The text was updated successfully, but these errors were encountered: