VS Code Extensions
S

SuperMongo Language Support

by paolofalomo

Syntax highlighting and language configuration for SuperMongo (.sm) scripts.

Downloads

5

Rating

— (0)

Version

0.0.5

Last updated

Apr 17, 2026

VS Code extension for SuperMongo (.sm) files.

What Is SuperMongo?

SuperMongo (SM) is an interactive plotting package for drawing graphs, widely used in scientific workflows.

This extension targets .sm scripts and macros to improve editing productivity in VS Code.

Official references:

Notes:

  • SuperMongo was written by Robert Lupton and Patricia Monger.
  • Princeton also hosts the SM reference manual and tutorial linked from the main SM page.

Features

  • Syntax highlighting for core SuperMongo keywords and commands
  • Go to Definition for user macros across indexed .sm files (Ctrl/Cmd+Click)
  • Hover info for user macros:
    • signature (name nargs)
    • header comment
    • definition location (file:line)
    • short body preview
  • Highlighting for:
    • comments (# ...)
    • strings ("...", '...')
    • variable references ($1, $$1, $name, $?name, $!name, !name)
    • control flow and plotting commands
    • math/system functions from the SM parser token list
  • Basic language configuration (line comments and bracket auto-close)

Macro Indexing

By default, the extension indexes all .sm files in the workspace.

You can configure indexing with VS Code settings:

{
  "supermongo.indexing.enabled": true,
  "supermongo.indexing.include": ["**/*.sm"],
  "supermongo.indexing.exclude": [
    "**/node_modules/**",
    "**/.git/**",
    "**/build/**",
    "**/dist/**",
    "**/out/**"
  ],
  "supermongo.indexing.maxFiles": 5000
}

Optional project file in workspace root: .supermongo-index.json

{
  "include": ["rfmacro/**/*.sm", "DOCS/**/*.sm"],
  "exclude": ["**/legacy/**"],
  "maxFiles": 2000
}

Precedence:

  1. VS Code settings (supermongo.indexing.*)
  2. .supermongo-index.json
  3. Extension defaults

Local test

  1. Open this folder in VS Code:
    • vscode-supermongo-language
  2. Press F5 to launch an Extension Development Host.
  3. Open any .sm file in the new window.

Build VSIX

npm install
npm run package

Install from VSIX in VS Code via Command Palette:

  • Extensions: Install from VSIX...

Related extensions