Getting Started โ€บ VS Code Extensionv1.1
Editor Support

VS Code Extension

First-class VS Code support for Pseudo โ€” syntax highlighting, pmap-driven snippets, inline diagnostics, and complexity analysis, all in one extension.

๐Ÿงฉ
Pseudo Language Support
Publisher: sanayvarghese ยท Extension ID: sanayvarghese.pseudo-syntax
Open in Marketplace โ†—

Features

๐ŸŽจ
Syntax Highlighting

Full token-level highlighting for .pseudo, .psu, .pmap, and pseudo.config files โ€” driven dynamically by your active pmap.

โœ‚๏ธ
Smart Snippets

Every pattern in your pmap becomes a live snippet with tab stops. Custom patterns from pseudo.config appear first.

๐Ÿ“–
Hover Documentation

Hover any line to see which pmap pattern it matched, what it captures, and complexity metrics for functions.

๐Ÿ”
Inline Diagnostics

Errors and warnings appear inline as you type. No need to run the file to catch mistakes.

๐Ÿ“Š
Complexity CodeLens

Time and space complexity overlays appear above every function definition. Click to see detailed reasoning.

โšก
Run from Editor

Run the current file or run with complexity analysis directly from the editor title bar.

Installation

From VS Code

  1. 1

    Open the Extensions panel

    Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS).

  2. 2

    Search for Pseudo

    Type pseudo language support in the search box and select the extension published by sanayvarghese.

  3. 3

    Click Install

    The extension activates immediately โ€” no reload required.

From the Command Line

bash
code --install-extension sanayvarghese.pseudo-syntax

Manual Install (.vsix)

Download the .vsix file from the GitHub Releases page and install via:

bash
code --install-extension pseudo-syntax-1.1.0.vsix

Supported File Types

File / ExtensionLanguage IDSupport
.pseudo, .psupseudoHighlighting ยท Snippets ยท Hover ยท Diagnostics ยท CodeLens ยท Run buttons
.pmappmapHighlighting (sections, placeholders, directives, strings)
pseudo.config, .pseudorcpseudo-configHighlighting (keys, paths, JSON structure)

Dynamic Highlighting

Unlike most language extensions, highlighting in Pseudo is not hardcoded. The extension reads your active .pmap file and extracts every keyword from every pattern โ€” these become the highlighted tokens in your .pseudo file. If you add a new keyword to your custom pmap, it lights up instantly.

โ„น
Live reload โ€” changing, creating, or deleting any .pmap file, pseudo.config, or .pseudorc automatically re-indexes highlighting and snippets without restarting VS Code.

pmap-Driven Snippets

Every pattern line in your active pmap is converted into a VS Code snippet. Placeholders like {var:name} become tab stops you can jump between with Tab.

custom.pmap
[FOR_LOOP]
for {var:name} from {start:expr} to {end:expr} step {step:expr}
for {var:name} from {start:expr} to {end:expr}

When you type for in a .pseudo file, both patterns appear as snippet completions โ€” with the cursor pre-placed on var, then start, then end as you press Tab.

๐Ÿ’ก
Custom patterns first โ€” if you have a pseudo.config pointing to a custom pmap, those patterns are listed before the defaults in the completion list.

pseudo.config Integration

The extension reads pseudo.config (or .pseudorc) from your workspace root to discover which custom .pmapyou're using โ€” the same file the runtime reads.

pseudo.config
{
  "pmap": "custom.pmap"
}

With this in place, the extension merges custom.pmap and default.pmap โ€” custom keywords and snippets take priority.

Hover & CodeLens

Function hover

Hovering a user-defined function name shows its signature and โ€” if you've run the file โ€” time and space complexity:

text
function bubbleSort(arr)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Complexity Analysis:
  Time Complexity  : O(nยฒ)
  Space Complexity : O(1)

Pattern hover

Hovering any other line shows which pmap pattern it matched and what values were captured:

text
Pseudo Mapping Explanation
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Matched: for {var:name} from {start:expr} to {end:expr}
Captures:
  {var}   = "i"
  {start} = "0"
  {end}   = "n"

Complexity CodeLens

A one-line complexity summary appears above every function definition after running the file. Click it to see the full reasoning in an output panel.

Run Buttons

Two buttons appear in the editor title bar when a .pseudo file is open:

ButtonCommandWhat it runs
โ–ถ (play)Pseudo: Run Filepseudo run <file>
๐Ÿ“ˆ (graph)Pseudo: Run with Complexity Analysispseudo run <file> --analyze --explain

Requirements

โš ๏ธ
Python required for runtime features โ€” hover explanations, diagnostics, CodeLens, and the run buttons all invoke pseudo under the hood. The extension automatically detects the Python interpreter from the ms-python.python extension if installed, otherwise falls back to python on your PATH.

Syntax highlighting and snippet completions work without Python โ€” only the runtime features require it.

Links