Umple language support for the Zed editor, providing syntax highlighting, diagnostics, code completion, inlay hints, and go-to-definition for .ump files.
The extension is available on the Zed marketplace. Install it from Zed:
- Open the command palette (
Cmd+Shift+P) and run zed: extensions - Search for Umple and click Install
The extension automatically downloads the LSP server and Umple compiler — no manual setup required.
To work on the extension itself, install it as a dev extension:
-
Clone this repo:
git clone https://github.com/umple/umple.zed.git
-
In Zed, open the command palette (
Cmd+Shift+P) and run zed: install dev extension -
Select the
umple.zeddirectory
- Rust (via rustup, not Homebrew rust — needed to compile the dev extension)
- Node.js 20+ (for running the LSP server; tested on 20 and 23)
- Java 11+ (optional — needed for diagnostics from the Umple compiler)
- Syntax highlighting via tree-sitter grammar and highlight queries
- Diagnostics from UmpleSync compiler
- Code completion with context-aware keyword suggestions
- Go-to-definition for classes, interfaces, traits, enums, attributes, methods, state machines, states, associations, mixsets, requirements, and
usestatements - Find references across all reachable files with state-path disambiguation
- Rename safe symbol rename across all references
- Hover contextual information for symbols
- Inlay hints editor-only inferred type annotations for untyped attributes when Zed renders LSP inlay hints
- Formatting AST-driven indent correction, arrow spacing, declaration assignment spacing, structural comma spacing, blank-line normalization
- Outline view showing classes, methods, state machines, and more
- Cross-file support transitive
usestatement resolution and cross-file diagnostics - Auto-indentation for blocks
Formatting is provided by the LSP server. It formats parse-clean Umple
structure, parser-visible structural commas, and already split multi-line list
indentation, but intentionally does not format embedded target-language method
or action bodies. Formatter behavior belongs in umple-lsp/packages/server;
this extension should only handle Zed launch/packaging behavior.
The extension automatically installs umple-lsp-server from npm and downloads umplesync.jar for compiler diagnostics. The server is launched via Node.js in --stdio mode.
You can adjust certain settings using Settings ... / Open Settings (cmd ,) or by editing the settings.json file.
By default lines of Umple code that have errors or warnings are underlined; you can see the error or warning at the bottom of the screen if you click on the underlined text.
However, if you would like such messages from the Umple compiler to appear inline (on the line where each problem occurs), then you can change the Languages & Tools / Diagnostics / Enabled setting to be true. You can also do this by adding the following to the settings.json file.
{
"diagnostics": {
"inline": {
"enabled": true
}
}
}
For development, you can override the auto-downloaded server with a local build. Add to your Zed settings.json (Cmd+,):
{
"lsp": {
"umple-lsp": {
"settings": {
"serverPath": "/path/to/umple-lsp"
}
}
}
}This points to a locally cloned and built umple-lsp repository.
Marketplace install: Zed updates installed extensions automatically. New versions reach you via the Zed Extensions marketplace.
Dev install (from source): pull the latest changes and Zed will pick them up:
cd umple.zed
git pullThen restart Zed or reload the extension.
The LSP server itself is downloaded from npm at every extension load (via npm_package_latest_version("umple-lsp-server")), so server-only changes reach you on the next Zed startup without any extension update needed.
The tree-sitter grammar and query files are derived from umple-lsp. The following files are auto-synced and should not be edited manually:
extension.toml[grammars.umple].rev— pinned commit forparser.clanguages/umple/highlights.scm— copied fromumple-lsp/packages/tree-sitter-umple/queries/
A GitHub Action in umple/umple-lsp auto-opens (or updates) a PR on this repo whenever grammar or query files change upstream. The PR force-pushes onto a stable branch sync/umple-lsp-master, bumps extension.toml patch version, and includes a body that classifies the change as grammar | highlights | both plus a "safe to merge?" hint. You just merge it.
If the auto-PR workflow is broken or you want to sync ahead of an upstream push:
./scripts/sync-grammar.sh --source /path/to/umple-lsp./scripts/sync-grammar.sh --source /path/to/umple-lsp --checkThis exits with code 1 if any synced file is out of date. The .github/workflows/check-sync.yml workflow in this repo runs this on every push/PR to master to catch drift.
This extension is mainly the Zed wrapper. Core language behavior belongs in umple-lsp:
- Diagnostics, completion, hover, inlay hints, go-to-definition, references, rename, formatting, workspace symbols, code actions, and LSP semantic tokens:
umple-lsp/packages/server - Parser and tree-sitter highlighting:
umple-lsp/packages/tree-sitter-umple - Zed extension loading, npm server download, language registration, and grammar pinning: this repo
Zed's visible syntax highlighting comes from the synced tree-sitter highlight query at languages/umple/highlights.scm. The LSP server also advertises semantic tokens for clients that use them; those are generated from the upstream highlights.scm and mapped in umple-lsp/packages/server/src/semanticTokens.ts.
When highlighting changes upstream, prefer the sync workflow or run:
./scripts/sync-grammar.sh --source /path/to/umple-lsp --check
./scripts/sync-grammar.sh --source /path/to/umple-lspChange this repo directly only when the Zed wrapper behavior changes or when accepting the generated grammar/highlight sync.
Zed compiles extensions to WebAssembly (wasm32-wasip2), which requires the Rust toolchain from rustup. Homebrew's rust package only includes the native target and can't cross-compile to WASM.
# Remove Homebrew rust if installed
brew uninstall rust
brew install rustup
# Or install rustup directly via [rustup](https://rustup.rs/)Check View > Toggle Language Server Logs in Zed for errors. Common issues:
- Node.js not found: Install Node.js 18+ and ensure it's on your PATH
- npm install failed: Check internet connection, restart Zed to retry
Diagnostics require Java 11+. Check the LSP logs (View > Toggle Language Server Logs) for errors related to umplesync.
MIT