magicsetonas

Syntax highlighter for cutting edge Setonas.

Setonas

116

4

Bug Reports

1.0.0

MIT

GitHub

Magic Setonas apm VSM

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.

Installation Instructions

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 language-python package.

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 "Python" to "ignored_packages" in the settings file).

In VSCode, starting with version 0.10.1, install MagicSetonas with Install Extension command.

Alternatively, the package can be installed manually in all editors:

Development

You need npm and node.js to work on MagicPython.

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. Use 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:

Multiple scopes

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.

Color Scheme

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.