Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Miranda Dev HelperNew to Visual Studio Code? Get it now.
Miranda Dev Helper

Miranda Dev Helper

miranda-dev

| (0) | Free
Advanced ESLint-style linter, quick fixes, formatting and syntax highlighting for the Miranda programming language
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Miranda Dev Helper

A professional, feature-complete VS Code extension for the Miranda functional programming language.


Features

🔍 Advanced ESLint-style Linter

10 configurable lint rules with individual severity levels (off / warn / error):

Rule ID Default Description
missing-equals error Missing = in function definition
unbalanced-parens error Unbalanced ( / ) on a line
incomplete-conditional warn Incomplete if-then-else expression
type-annotations warn Top-level function missing type annotation
trailing-whitespace warn Trailing whitespace characters
line-length warn Line exceeds maximum length (default 80)
mixed-indentation error Tab characters in indentation
guard-style warn Guard spacing / prefer otherwise over True
list-comprehension warn Malformed list comprehension generators
where-indent warn Incorrect indentation inside where blocks

⚡ Quick Fixes (Auto-fixable)

The lightbulb 💡 icon appears on fixable issues:

  • Trailing whitespace — removes it
  • Tab indentation — replaces tabs with 4 spaces
  • Guard spacing — adds space after |
  • Guard style — replaces True catch-all with otherwise
  • Where indentation — corrects to configured indent size
  • Fix All — applies all auto-fixes in one click (Shift+Alt+X)

📝 Syntax Highlighting

Full TextMate grammar covering:

  • Keywords: where, let, in, if, then, else, otherwise, type, abstype, case, of
  • Types (uppercase identifiers)
  • Primitive types: num, bool, char, string
  • Operators: ->, ::, <-, ++, |, $, \, .
  • String and character literals
  • Numbers (integers and floats)
  • Comments (||)

🔤 Hover Documentation

Hover over any keyword or operator for inline docs: where · let · if/then/else · otherwise · type · abstype · :: · -> · <- · ++ · map · filter · foldr · foldl

📐 Document Formatter (Shift+Alt+F)

  • Normalizes spaces around operators (->, ::, ++, ==, ~=, <=, >=)
  • Normalizes comma spacing
  • Collapses multiple blank lines into one
  • Trims trailing whitespace

✂️ Code Snippets

Prefix Expands to
fun Function with type annotation
fung Function with guards
ite if-then-else expression
where Expression with where clause
letin let-in expression
type Type synonym
abstype Algebraic type declaration
lc List comprehension
rec Recursive function
map map via list comprehension
filter filter via list comprehension
foldr / foldl Fold definitions
header Script file header

📊 Status Bar

Live error/warning count in the status bar. Click it for a full lint summary showing issues by rule.


Installation

Development Mode (Recommended for testing)

# 1. Install dependencies
npm install

# 2. Compile TypeScript
npm run compile

# 3. Open project in VS Code
code .

# 4. Press F5 to open Extension Development Host
# 5. Open test-files/test.miranda in the new window

Package as VSIX

npm install -g @vscode/vsce
vsce package
# Produces: miranda-linter-1.0.0.vsix

# Install:
code --install-extension miranda-linter-1.0.0.vsix

Configuration

All settings are under miranda.* in VS Code settings (Ctrl+,):

{
  // Enable/disable linter entirely
  "miranda.linter.enabled": true,

  // Indentation size (spaces)
  "miranda.linter.indentSize": 4,

  // Max line length (0 = disabled)
  "miranda.linter.maxLineLength": 80,

  // Per-rule severity: "off" | "warn" | "error"
  "miranda.linter.rules.missingEquals": "error",
  "miranda.linter.rules.unbalancedParens": "error",
  "miranda.linter.rules.incompleteConditional": "warn",
  "miranda.linter.rules.unusedVariables": "warn",
  "miranda.linter.rules.typeAnnotations": "warn",
  "miranda.linter.rules.lineLength": "warn",
  "miranda.linter.rules.trailingWhitespace": "warn",
  "miranda.linter.rules.mixedIndentation": "error",
  "miranda.linter.rules.guardStyle": "warn",
  "miranda.linter.rules.listComprehension": "warn",
  "miranda.linter.rules.whereIndent": "warn",

  // Formatter
  "miranda.formatter.enabled": true,
  "miranda.formatter.normalizeOperators": true
}

Keyboard Shortcuts

Shortcut Action
Shift+Alt+F Format document
Shift+Alt+X Fix all auto-fixable issues

Commands (Command Palette Ctrl+Shift+P)

  • Miranda: Format Document
  • Miranda: Run Linter
  • Miranda: Show Lint Summary
  • Miranda: Fix All Auto-Fixable Issues

Test File

Open test-files/test.miranda to see all lint rules in action. It contains:

  • ✅ Section 1 — 13 correct Miranda functions (no issues)
  • ❌ Section 2 — missing-equals triggers
  • ❌ Section 3 — unbalanced-parens triggers
  • ⚠️ Section 4 — incomplete-conditional triggers
  • ⚠️ Section 5 — trailing-whitespace (auto-fixable)
  • ⚠️ Section 6 — type-annotations missing
  • ⚠️ Section 7 — guard-style issues (auto-fixable)
  • ⚠️ Section 8 — line-length exceeded
  • ❌ Section 9 — mixed-indentation (tabs, auto-fixable)
  • ⚠️ Section 10 — where-indent wrong spacing (auto-fixable)
  • 📖 Section 11 — Hover documentation examples
  • ✂️ Section 12 — All snippet prefixes listed
  • 📐 Section 13 — Formatter test (use Shift+Alt+F)
  • 🔬 Section 14 — Complex realistic Miranda programs

Language Notes

Miranda uses || for line comments, = for both equality in patterns and function bodies, :: for type annotations, and -> for function types. Layout (indentation) is significant for where and let blocks.


Built with ❤️ for Miranda programmers.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft