Neovim plugin for the Umple modeling language. Provides diagnostics, code completion, go-to-definition, and syntax highlighting for .ump files.
- Neovim 0.9+ (0.10+ recommended)
- Node.js 18+ (for running the LSP server)
- A C compiler (
ccorgcc) for compiling the tree-sitter parser - Java 11+ (optional — only needed for diagnostics)
- A plugin manager — this guide uses lazy.nvim
macOS (via Homebrew):
brew install neovim node
brew install openjdk # optional, for diagnosticsUbuntu/Debian:
sudo apt install neovim nodejs npm build-essential
sudo apt install default-jdk # optional, for diagnosticsIf you don't have a plugin manager yet, follow the lazy.nvim installation guide.
Add this to your lazy.nvim plugin list:
{
'umple/umple.nvim',
build = './scripts/build.sh',
dependencies = {
'neovim/nvim-lspconfig',
'nvim-treesitter/nvim-treesitter',
},
config = function()
require("umple-lsp").setup()
end,
}The build script downloads the LSP server from npm and fetches the tree-sitter grammar. The tree-sitter parser is compiled automatically on first load — no manual steps needed.
For auto-popup completion, install a completion plugin such as nvim-cmp with cmp-nvim-lsp. Without one, the LSP server still provides completions but you won't see them automatically.
require("umple-lsp").setup({
port = 5556, -- UmpleSync port (default: 5556)
on_attach = function(client, bufnr)
-- your custom keybindings
end,
})| Key | Action |
|---|---|
gd |
Go to definition |
<leader>e |
Show diagnostics float |
[d |
Previous diagnostic |
]d |
Next diagnostic |
- Diagnostics: Real-time error and warning detection (requires Java)
- Go-to-definition: Jump to classes, interfaces, traits, enums, attributes, methods, state machines, states, associations, mixsets, requirements, and
usestatements - Code completion: Context-aware keyword and symbol completion
- Syntax highlighting: Via tree-sitter grammar (compiled automatically)
:Lazy update umple.nvimThis pulls the latest plugin code and re-runs the build script (which updates the LSP server and tree-sitter grammar).
The plugin compiles the tree-sitter parser on first load. If it fails:
- Make sure you have a C compiler:
cc --versionorgcc --version - Delete the cached parser and restart Neovim to recompile:
rm -f ~/.local/share/nvim/site/parser/umple.so rm -rf ~/.local/share/nvim/site/queries/umple
Diagnostics require Java 11+. Verify: java -version
- Check that Node.js is installed:
node --version - Run
:LspLogin Neovim to see server errors - Rebuild the plugin:
:Lazy build umple.nvim
To test local changes to the LSP server:
- Clone both repos side by side:
workspace/
├── umple-lsp/ # LSP server monorepo
└── umple.nvim/ # This plugin
- Build the server locally:
cd umple-lsp
npm install
npm run compile
npm run download-jar- Override the plugin's paths to use your local build:
{
dir = '/path/to/umple.nvim',
dependencies = {
'neovim/nvim-lspconfig',
'nvim-treesitter/nvim-treesitter',
},
config = function()
require("umple-lsp").setup({
plugin_dir = '/path/to/umple.nvim',
})
end,
}Then symlink the local server into the plugin's expected locations:
cd umple.nvim
# Symlink tree-sitter grammar
ln -sf ../umple-lsp/packages/tree-sitter-umple tree-sitter-umple
# Symlink local server into node_modules (jar is already inside packages/server/)
mkdir -p node_modules
ln -sf ../../umple-lsp/packages/server node_modules/umple-lsp-serverAfter making changes to the server, recompile and restart:
cd umple-lsp
npm run compile # Server-only changes
npm run build-grammar # After grammar.js changes (regenerates parser + WASM + compiles)Then in Neovim: :LspRestart
After grammar changes, also delete the cached native parser so Neovim recompiles it:
rm -f ~/.local/share/nvim/site/parser/umple.so
rm -rf ~/.local/share/nvim/site/queries/umpleThe build script installs the pre-compiled umple-lsp-server from npm, downloads umplesync.jar for diagnostics, and extracts the tree-sitter grammar (src/parser.c + queries/) from the umple-lsp repo. The plugin compiles the tree-sitter parser automatically on first load (into ~/.local/share/nvim/site/parser/umple.so) and points Neovim's LSP client at the npm-installed server.