Skip to content

VS Code Extension

Search for Purus in the VS Code Extension Marketplace, or install from the command line:

Terminal window
code --install-extension otoneko1102.purus

Full TextMate grammar for .purus, .cpurus, and .mpurus files with highlighting for:

  • Keywords (fn, const, let, if, for, match, etc.)
  • Operators (be, add, sub, eq, and, pipe, etc.)
  • Strings (///...///)
  • Comments (-- line, --- block)
  • Numbers (integers, floats)
  • Function definitions and calls
  • Regular expressions
PrefixDescription
fnFunction declaration
fntFunction with expression body
afnAsync function
constConstant declaration
letVariable declaration
ifIf statement
ifeIf-else statement
unlessUnless statement
forFor-in loop
forrFor-range loop
whileWhile loop
untilUntil loop
matchMatch expression
tryTry-catch block
impImport statement
impnNamed import
pubExport (pub)
modModule namespace
logconsole.log

.purus, .cpurus, and .mpurus files automatically get the Purus icon — no settings.json modification required.

  • Comment toggle: Ctrl+/ inserts -- line comments
  • Block comments: --- ... ---
  • Auto-closing: [] brackets and /// strings
  • Folding: indent-based folding (off-side rule)
  • Word pattern: supports kebab-case identifiers