TextMate syntax highlighting for the Nix expression language.
- Line comments (
#) and block comments (/* */) - Double-quoted strings with
${...}interpolation - Indented strings (
'' ... '') with interpolation and escape sequences - Recursive interpolation highlighting (nested expressions inside
${}) - Keywords:
if,then,else,let,in,with,rec,inherit,assert,or - Builtins:
import,derivation,builtins.*,throw,map, etc. - Constants:
true,false,null - Numeric literals (integers and floats)
- File paths (
./relative,/absolute,~/home) - Search paths (
<nixpkgs>) - URIs
- Function parameters and
@patterns - Attribute names in bindings
- Operators:
//(merge),++(concat),->(implication),?(has-attr), etc. - Comment toggling (Cmd+/ and Opt+Cmd+/)
- Auto-indentation for
{,[,let/in
Clone to your TextMate Bundles directory:
git clone https://github.com/brianwarsing/nix.tmbundle.git \
~/Library/Application\ Support/TextMate/Bundles/Nix.tmbundleThen reload bundles in TextMate: Bundles > Bundle Editor > Reload Bundles
Automatically activates for *.nix files.
MIT