Line comments with # including toggle/comment actions
Bracket, brace, and quote auto-closing/surrounding pairs aligned with the Mach parser
Language server integration offering hover, go-to-definition, references, and completion via mach-lsp
Command palette actions to build, run, and debug Mach workspaces without leaving VS Code
Getting Started
Install the extension from the Marketplace or load this workspace in VS Code
Open a .mach source file - syntax highlighting and comment toggling work out-of-the-box
Pair with the cmach compiler (bootstrap compiler) or future self-hosted compiler from the mach repository
Use the Mach: Build Project, Mach: Run Project, and Mach: Debug Project commands to work with your Mach projects
Language server integration
The extension now launches the experimental mach-lsp server on demand.
Build the sibling repository:
cd ../mach-lsp
make
Open this mach-vscode folder in VS Code and launch the extension (F5) or install it from a packaged .vsix.
The extension looks for ../mach-lsp/out/bin/mach-lsp by default. Override the binary path via the mach.lspPath setting if you keep the server elsewhere.
Use the Mach: Restart Language Server command from the palette after rebuilding the server.
Set mach.trace.server to verbose in user settings to inspect the JSON-RPC traffic while debugging the language server.
Build, run, and debug settings
All commands use the workspace root as their working directory and can be tuned through the following settings: