The MUFL language server is a VS Code extension that provides syntax highlighting, diagnostics, go-to-definition, and rename for .mufl, .mu, and .mm files. It is built from source out of the adapt-toolkit/adapt repository.

The language server packages (@adapt-toolkit/langserver-client, @adapt-toolkit/langserver-server) are not currently published to npm. Building from source is the only supported install path.

Prerequisites

Build the language server

From the root of the adapt checkout:

cd typescript
npm ci
npm run build

This builds every workspace in the TypeScript monorepo, including the language-server client and server packages at typescript/langserver/client and typescript/langserver/server.

Package and install the VS Code extension

Package the client workspace as a .vsix:

cd typescript/langserver/client
vsce package

Then install it into your VS Code:

code --install-extension mufl-langserver-*.vsix

Open any .mufl, .mu, or .mm file. The extension activates automatically.

Configure the extension

Once installed, open VS Code Settings and search for mufl language server. The notable settings are:

  • Enable Meta — when on, the language server runs the meta type-checking stage on every save. Slower, but catches type errors in-editor. You can also toggle this per file with pragma langserver force_meta or pragma langserver no_meta.
  • Environment Variables — JSON map passed through to the compiler. Useful for setting MUFL_STDLIB so the compiler can find the standard library.
  • Path To Meta — absolute path to the directory containing meta.mm.
  • Path To Transactions — absolute path to the directory containing transaction.mm and __t_wrapper.mm.
  • Trace: Server — controls the verbosity of the client↔server log channel.

To make the meta toggle a one-keystroke action, bind a shortcut to the muflLangServer.enableMeta command under File → Preferences → Keyboard Shortcuts.