LSP, Highlight & Format
First-class plugins for JetBrains IDEs, VS Code, Neovim, and Zed. Standard Tree-sitter highlighting and LSP under the hood, so any editor can plug in.
JetBrains IDEs
Open Settings → Plugins → Marketplace, search for "MetaScript", and click Install. Restart the IDE when prompted. Or grab it from plugins.jetbrains.com.
Requires IntelliJ-based IDE 242+ (2024.2 or newer) and msc on PATH.
VS Code
Open Extensions (Cmd+Shift+X / Ctrl+Shift+X), search for "MetaScript", and click Install. Or grab it from marketplace.visualstudio.com.
The extension auto-detects the msc binary. If it can't find one, it offers to install it on first run. Configuration, commands, and server-discovery rules are documented in the extension README inside VS Code after install.
Zed
Open Extensions (Cmd+Shift+X), search for "MetaScript", and click Install. (Marketplace submission pending — see PR #5862; meanwhile, install from source via metascriptlang/metascript-zed.)
Requires msc on PATH.
Neovim
The plugin lives at github.com/metascriptlang/metascript.nvim and ships with a bundled tree-sitter grammar -- no external grammar coordination needed.
Install with lazy.nvim
{
"metascriptlang/metascript.nvim",
ft = { "metascript" },
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
opts = {
server_path = "msc",
lsp = true,
treesitter = true,
},
}Verify
Run :checkhealth metascript to verify your setup. You should see green checks for the parser, LSP, and bundled queries.
Textobjects (optional)
Add nvim-treesitter-textobjects for motions like vaf (select around function), vif (select inner function), vac (around class), via (inner argument):
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-treesitter/nvim-treesitter-textobjects",
},LSP Server
All three editors use the same language server: msc lsp. It communicates over stdio and provides:
| Feature | Description |
|---|---|
| Completion | Context-aware suggestions with type info |
| Hover | Type signatures and documentation |
| Go to Definition | Jump to symbol definitions |
| Find References | All usages across files |
| Rename | Project-wide symbol rename |
| Diagnostics | Inline errors and warnings |
| Inlay Hints | Inline type annotations |
| Semantic Tokens | Enhanced highlighting |
| Signature Help | Function parameter hints |
Verify the Server
# Check that msc is available
msc --version
# Test the LSP directly
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"capabilities":{}}}' | msc lspTroubleshooting
"msc not found" / "server not found"
Ensure msc is on your PATH:
export PATH="$HOME/.metascript/bin:$PATH"Or set the path explicitly in your editor settings.
LSP not starting
- Verify
msc lspruns without errors in a terminal - Check the editor's output/log panel for error details
- Try restarting the language server via the editor command
No syntax highlighting
- Neovim: Run
:TSInstall metascriptto compile the parser, then:checkhealth metascript - VS Code: The TextMate grammar loads automatically. For semantic highlighting, ensure the server is running.
- Zed: The grammar compiles automatically on first load. Restart Zed if highlighting doesn't appear.
Next Steps
- Multiple Backends — Compile to C, JavaScript, or WebAssembly
- Types — Type system reference
- Playground — Try MetaScript in the browser