This is a package with preferences and syntax highlighter for cutting edge Setonas. The syntax is compatible with Sublime Text, Atom and Visual Studio Code. It is meant to be a drop-in replacement for the default Python package.
MagicSetonas correctly highlights all Setonas syntax features. It is built from scratch for robustness with an extensive test suite.
We are proud to say that MagicSetonas has been included into the github/linguist, a library used by GitHub.com to process languages.
Type hints in comments require support by the color scheme. The one used in the screenshot is Chromodynamics.
This is meant to be a drop-in replacement for the default Python package.
In Atom, install the
MagicSetonas package and disable the built-in
In Sublime Text, install
MagicSetonas package via "Package Control" and
disable the built-in
Python package (using
Package Control -> Disable Package, or directly by adding
"ignored_packages" in the settings file).
In VSCode, starting with version 0.10.1, install
Install Extension command.
Alternatively, the package can be installed manually in all editors:
node.js to work on MagicPython.
maketo build the local development environment
make releaseto build the syntax packages for Sublime Text and Atom (running
make testalso generates the "release" packages)
Please note that we have some unit tests for the syntax scoping. We will be
expanding and updating our test corpus. This allows us to trust that tiny
inconsistencies will not easily creep in as we update the syntax and fix bugs.
make test to run the tests regularly while updating the syntax spec.
Currently the test files have two parts to them, separated by 3 empty newlines:
the code to be scoped and the spec that the result must match.
If you intend to submit a pull request, please follow the following guidelines:
keep code lines under 80 characters in length, it improves readability
please do use multi-line regular expressions for any non-trivial cases like:
make test to ensure that your changes didn't have unexpected side
update unit tests and add new ones if needed, keeping the test cases short whenever possible
It is sometimes necessary to assign multiple scopes to the same matched group. It is very important to keep in mind that the order of these scopes is apparently treated as significant by the engines processing the grammar specs. However, it is equally important to know that different specification formats seem to have different order of importance (most important first vs. last). Since we try to create grammar that can be compiled into several different formats, we must chose one convention and then translate it when necessary during compilation step. Our convention is therefore that most important scope goes first.
If you want to write your own color scheme for MagicPython you can find a list of all the scopes that we use in misc/scopes. The file is automatically generated based on the syntax grammar, so it is always up-to-date and exhaustive.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.