ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Rainbowth

by whitequark ST3

Rainbowth is a Sublime Text 3 plugin that highlights matching parentheses in Lisp source code.

Details

Installs

  • Total 4K
  • Win 1K
  • OS X 1K
  • Linux 773
May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8
Windows 3 2 2 2 2 1 4 3 6 2 2 0 1 7 2 2 3 2 2 6 2 3 3 1 2 0 4 6 3 4 5 1 2 4 2 3 1 1 1 2 7 6 2 1 4 1
OS X 1 2 4 1 0 5 0 2 1 5 1 0 4 3 3 6 2 2 2 5 5 7 1 3 2 5 1 1 4 2 3 3 1 0 2 0 2 2 2 2 5 6 7 7 3 2
Linux 0 1 0 1 0 4 1 3 4 1 3 1 3 0 1 2 1 0 1 1 1 2 1 0 0 1 2 0 1 1 2 1 0 1 1 1 1 0 0 1 3 3 2 0 0 1

Readme

Source
raw.​githubusercontent.​com

Rainbowth

What is this?

Rainbowth is a Sublime Text 3 plugin that automagically highlights matching parentheses, brackets, and curly braces in source code. While the name does imply a certain sequence of colors, the palette used to paint them is entirely configurable; nonetheless, the effect is perhaps best demonstrated when viewed with a theme like Tomorrow Night:

img

Why?

It took about three hours for Racket to grow on me. I know with a fair amount of certainty that I'd like to master it, but the structure is going to take some getting used to. This plugin attempts to overcome one of the primary barriers to entry, that of not being able to tell what's related beyond the matching of a single parenthetical pair.

Installation

Install Rainbowth via Package Control, or clone this repository directly into your Packages directory.

Setup

The color scheme must be unpacked in the user's Packages folder and writable for Rainbowth to be able to automatically insert its palette.

The default themes can be located in the Color Scheme - Default.sublime-package (or Color Scheme - Legacy.sublime-package on newer Sublime Text installations) file in the Sublime Text installation folder. Use a zip archive manager to extract the .tmTheme file corresponding to the theme you like. There is currently no support for the new .sublime-color-scheme file format.

Configuration

Rainbowth's default configuration can be customized by creating a Rainbowth.sublime-settings file in Packages/User.

The palettes setting is a mapping of theme names to the list of colors to use for painting parentheses while using that theme, outermost first. When using a theme not specified, the default ROYGBIV sequence will be used.

{
  "palettes": {
    "default": ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]
  }
}

Highlighting for a given language can be enabled (or disabled) by updating the languages setting.

{
  "languages": ["lisp", "scheme", "clojure", "clojurescript", "hylang"]
}

Contributing

Comments, criticisms, and code are all eagerly welcomed.