Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>mm2-formatterNew to Visual Studio Code? Get it now.
mm2-formatter

mm2-formatter

Tewobsta Seyoum

|
2 installs
| (1) | Free
Official code formatter for mm2 language
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MM2 & MeTTa Universal Code Formatter

A structural formatting engine for parenthetical languages. Enforces standard 2-space indentation, strips unnecessary whitespace padding, and collapses standalone closing parentheses.

[1] How to Install the Extension (.vsix)

The extension is officially published to the Visual Studio Code Marketplace. You can search for it directly inside your editor or install it via the web registry.

Method A: Install Direct from VS Code (Recommended)

  1. Open VS Code.
  2. Open the Extensions view sidebar panel (Ctrl + Shift + X on Windows/Linux or Cmd + Shift + X on macOS).
  3. In the search bar at the top, type mm2-formatter.
  4. Select the extension from the search results and click the blue Install button.

Method B: Install local .vsix file

  1. Open VS Code.
  2. Open the 'Extensions' view panel on the left sidebar by clicking the Extensions icon.
  3. Click the '...' (More Actions) horizontal three-dots menu icon in the top-right corner of the Extensions panel.
  4. Select 'Install from VSIX...' from the dropdown menu.
  5. Browse to the location where you saved the downloaded file: mm2-formatter-0.0.3.vsix Select it, and click 'Install'.
  6. [CRITICAL] Restart VS Code: Completely close and re-open VS Code after the installation completes to ensure the new extension activates correctly.

[2] How to Use on Any File Extension

The formatter is universally registered to ignore strict file limitations. It handles .mm2, .metta, .md, or plain .txt profiles seamlessly.

Step 1: Format the Document Manually

Because keyboard shortcuts can vary depending on your personal keybindings or conflicting extensions, use the explicit menu commands to run the formatter:

  1. Open your target code file in VS Code.
  2. Right-click anywhere inside the code editor window to open the context menu.
  3. Select 'Format Document' from the dropdown menu.

Step 2: Configure the Default Formatter (Required if prompted)

If VS Code asks you to install a formatter or shows a conflict prompt, you must explicitly set this engine as your default provider:

  1. Right-click inside your code editor window again.
  2. Select 'Format Document With...' from the menu.
  3. Click 'Configure Default Formatter...' at the bottom of the popup selection list.
  4. Select 'mm2-formatter' from the list.

NOTE: Once configured, VS Code will permanently remember this choice for that file extension, preventing any future prompts to install alternative formatters.

[3] Optional: Keyboard Shortcuts

If you prefer using the keyboard and have not overridden the default VS Code layout configurations, you can also trigger the formatting engine using these standard aliases:

  • Windows / Linux : Shift + Alt + F
  • macOS : Shift + Option + F

https://github.com/user-attachments/assets/38029a1d-f518-465a-9959-9bba75f15ea4

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