MagicStack: Python syntax highlighter for Sublime Text and Atom
github.com
github.com
I've been thinking about scratching the itch to expand emacs Python highlighting to match that of Atom. From the looks of it, the code highlighting was primarily regex based, and the same from my cursory observations looking at emacs Python-mode syntax highlighting mechanisms. Could I incorporate this somehow into emacs from what I've said here so far?
Also, thanks for helping out the community!
MagicPython is a completely new implementation, written from scratch. The ultimate goal would be to integrate it into Atom and Sublime Text by default (here's an issue I created for Atom for example [1])
> Could I incorporate this somehow into emacs from what I've said here so far?
I'm not an emacs user myself, so I'm not sure. You can probably re-use some of the regexp tricks, and definitely our unit-tests.
[0]: https://github.com/MattDMo/PythonImproved
[1]: https://packagecontrol.io/readmes/img/048b2068c7a455f3796334...
r'('
Besides broken regexps, PythonImproved still doesn't highlight async/await, highlights raw docstrings as regexps, incorrectly handles implicit line continuations in function parameter annotations, etc.Edit: here's an issue that documents some differences [1]
def foo() -> int:
return aFor now it has to be installed manually. I'll submit it to Package Control and create an Atom version soon.
(I'd probably elect to highlight it, just saying that it's not a reserved word in any way.)