Provides syntax highlighting, language configuration, and a client for the
compiler's mux lsp server for Mux files (.mux) in Visual Studio Code.
The extension package identifier is muxlang.mux-programming-language. The
Visual Studio Marketplace lists this extension under that ID. Build and
install a local VSIX using the instructions in INSTALL.md.
Features
- Syntax highlighting (keywords, strings, comments, operators, literals)
- Language configuration (bracket matching, auto-closing pairs, comment toggling)
- Mux language icon in the Extensions panel
- Live diagnostics, safe fixes, and formatting when
mux is installed
- Document symbols, go-to-definition, hover, completion, and signature help
through the Mux language server
- References and rename for compiler-resolved identifiers and members when
supported by the installed compiler release
- Semantic tokens, inferred type hints, and folding ranges when supported by
the installed compiler release and editor
The server command defaults to mux on PATH. Set the machine-scoped
mux.serverPath VSCode setting to use another compiler executable.
Development
Prerequisites
- Node.js and npm
- From the repository root:
npm ci
The extension grammar is generated from ../../shared/syntax-matrix.json via ../../scripts/generate-syntax.js.
Build and Package
source.mux.json is generated and not committed. From the repository root:
npm run package:vscode # generates the grammar and packages runtime dependencies
npm run verify:vscode-package
Install Locally
code --install-extension dist/mux-programming-language.vsix
Reload the window afterward (Ctrl+Shift+P -> "Developer: Reload Window").
See ../../INSTALL.md for the full cross-editor install guide.
Test Changes
- Edit
../../shared/syntax-matrix.json
- Run
npm run package:vscode from the repository root
- Install the
.vsix in VSCode
- Reload window (Ctrl+Shift+P -> "Developer: Reload Window")
File Structure
language-configuration.json - Editor behavior (brackets, comments)
mux-icon.png - Extension icon
extension.js - VSCode client for mux lsp
package.json - VSCode extension manifest
Scope Names
The grammar uses standard TextMate scope names:
keyword.control.mux - if, else, for, while, match, as, in, is
keyword.declaration.mux - auto, func, returns, return, const, class, interface, enum, import
constant.language.mux - none, true, false, common
string.quoted.*.mux - Single and double-quoted strings
comment.*.mux - Line and block comments
Colors are determined by the active VSCode theme, not the grammar itself.
| |