Skip to content

switch to a different tool for python syntax highlighting #5824

@DetachHead

Description

@DetachHead

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):

AFAIK this is not a standard defined in any PEP, and popular code formatter such as black will convert any R'' strings into r'' by default.

I get the reasoning behind this decision, and there were some arguments for it since TextMate and Sublime Text both highlight Python syntax this way by default, but with the widespread use of VSCode these days (which does not highlight raw strings in Python this way by default) this argument seems outdated. Ideally this idiosyncratic highlighting could be made optional, preferably off by default.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions