Giter Site home page Giter Site logo

magicsetonas's Introduction

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:

  • copy the MagicPython package into the Sublime/Atom/VSCode user packages directory;
  • disable Python package;
  • enjoy.

Development

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

  • clone the repository
  • run make to build the local development environment
  • run make release to build the syntax packages for Sublime Text and Atom (running make test also 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. 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:

  • keep code lines under 80 characters in length, it improves readability

  • please do use multi-line regular expressions for any non-trivial cases like:

    • the regexp contains a mix of escaped and unescaped braces/parentheses
    • the regexp has several | in it
    • the regexp has several pairs of parentheses, especially nested ones
    • or the regexp is simply longer than 35 characters
  • always run make test to ensure that your changes didn't have unexpected side effects

  • update unit tests and add new ones if needed, keeping the test cases short whenever possible

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.

magicsetonas's People

Contributors

robcommanderpike avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.