language-squirrel

August 22, 2017 ยท View on GitHub

Add syntax highlighting and snippets to Squirrel files in Atom.

Settings

Squirrel offers two variations of for single-line comments // (two slashes) and # (hash). By default the alternative # is selected.

Snippets

container snippets

TriggerNameBody
funcfunctionfunction functionName (arg) { # body }

local variable snippets

TriggerNameBody
locallocal variablelocal x = 1;
lfunclocal functionlocal functionName = function(arg) { # body };
lclasslocal classlocal className = class { # body };

loop snippets

TriggerNameBody
whilewhilewhile (condition) { # body }
forforfor (local i = 0; i < 10; i++) { # body }
foreforeachforeach (idx, val in container) { # body }

control flow snippets

TriggerNameBody
ifif conditionalif (cond) { # body }
ifeif else conditionalif (cond) { # body } else { # body }
elselseelse { # body }
elifelseelse if (cond) { # body }
switchswitch blockswitch (cond) { default: break; }

Contributing

See the Atom contributing guide

License

This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.