Skip to content

trailofbits/vscode-masm

Repository files navigation

MASM VS Code Extension

VS Code LSP client for the Miden assembly language (MASM) powered by the masm-lsp language server.

Features

The extension provides:

  • Syntax highlighting for .masm files.
  • Inlay hints for MASM instructions. Inlay hints example]
  • Goto symbol definitions and references.
  • Procedure documentation on hover. Hover documentation example

Commands

The extension provides the following commands (accessible via the Command Palette):

Command Description
MASM: Restart Language Server Restart the LSP server
MASM: Toggle Inlay Hints Enable or disable inlay hints
MASM: Set Inlay Hints Position Set the column to align inlay hints to
MASM: Toggle Inlay Hint Type Switch between showing descriptions or disassembly

Requirements

  • masm-lsp binary available on your PATH (or configure masm-lsp.serverPath).
  • Node.js 18+ for running/building the extension.

Development

To build and package the extension, run the following commands:

cd vscode-masm
npm install      # To install dependencies
npm run compile  # To compile the extension
npm run package  # To package the extension into a .vsix file

The resulting .vsix file can be installed in VS Code via the "Extensions: Install from VSIX" command.

Configuration

  • masm-lsp.serverPath: absolute path or command name for the LSP binary (defaults to masm-lsp).
  • masm-lsp.trace.server: LSP trace level (off, messages, verbose).
  • masm-lsp.stdlibPath: path to the miden-vm repository containing the MASM stdlib. If omitted, the extension will try to infer it from the current workspace; if it cannot, it will prompt once. Leaving it blank lets the server auto-clone a temporary copy.
  • masm-lsp.inlayHints.position: column to align inlay hints to. If 0, hints use minimum padding only. If the line extends past this column, minimum padding is used instead.
  • masm-lsp.inlayHints.minimumPadding: minimum number of spaces between source code and inlay hints.

About

VS Code extension for MASM (Microsoft Macro Assembler)

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published