-
Notifications
You must be signed in to change notification settings - Fork 147
Integrate MagicPython in Atom #109
Comments
I have a fix open for both of those issues right now - are there any other benefits that MagicPython would bring (other than more unit tests, which are always nice)? Would you consider PRing the improvements from Magic Python over to this repo? |
Some benefits:
Even if you decide against integrating MagicPython, I'd suggest you to evaluate using our syntaxdev package. It simplifies writing unit-tests for syntaxes greatly.
Since MagicPython was written from scratch, it's not easy to incorporate its improvements. I'd simply consider reusing its 'cson' file in this package, or integrating MagicPython as a submodule repo. Here are some screenshots, built-in Python syntax on the left, MagicPython on the right (some examples are a bit crazy, they come from our unit-tests): |
+1 MagicPython adoption -- a complete rebuild lead to greater enhancements |
It looks like github/linguist now uses MagicPython to highlight Python code on GitHub. Maybe we should use it in Atom editor by default too? MP is super stable at this point. |
+1 for MagicPython adoption as a default. I imagine many Python devs will install it right away when setting up Atom. |
I also support this move. MagicPython is the superior Python highlighter, probably the best Python highlighter available today for any editor. Even for very simple code that does not use fancy features like type annotations, MagicPython often produces subjectively "better" results, an example being highlighting Probably the most compelling argument to switch is that MagicPython also supports Sublime and VSCode, so it is going to benefit from a wide community exposure, which would soon make it the better system anyway if it wasn't already. |
Given the increasing amount of unsupported syntax (see: all pull requests) and how catastrophically it can break the TextMate-ported highlighter, this needs to occur. Most of the outstanding PRs are bandaids on a severed limb. |
I'll make a PR in a few days. |
@1st1 First of all, sorry for the late response (I've been meaning to reply to your comment on the other issue for a few days now, but it keeps slipping my mind 😞). Can you please hold off creating a PR for now? We haven't worked out the specifics of how we're going to migrate to MagicPython yet, but once we do I'll be sure to let you know! |
@50Wliu Sure, NP. FWIW my plan was to make If you just copy MagicPython grammar to language-python, that will inevitably result in maintenance overhead for all of us. |
/cc @elprans @vpetrovykh |
FWIW VSCode now includes MagicPython by default. |
I spoke in Slack with @ambv about swapping out language-python for MagicPython in the next beta release. This will be primarily (entirely, perhaps?) a change in atom/atom. If someone wants to start the PR there one of us GitHubbers (or perhaps @50Wliu) can get involved in the next couple of weeks. In particular making sure it gets properly packaged on the various CIs, you’re likely to need help. |
I can make a PR sometime next week. |
Yury, ping ;) |
We have decided not to migrate to MagicPython. Please see atom/atom#13877 (comment) for the rationale. |
Hi,
There are many open issues (#55 or #39 are especially hard to fix) for this package that are non-issues for the https://github.com/MagicStack/MagicPython syntax highlighter. We've spend quite a bit of time designing a new python highlighter from scratch, along with writing a huge corpus of unit tests. Should we consider integrating it in Atom by default?
The text was updated successfully, but these errors were encountered: