Neovim plugin for boundary, a DDD/Hexagonal Architecture static analysis tool.
Provides LSP integration (diagnostics and hover) via boundary-lsp and commands that shell out to the boundary CLI for architecture scores, analysis reports, and diagrams.
Requires Neovim 0.11+ (uses native vim.lsp.config/vim.lsp.enable).
{
"rebelopsio/boundary.nvim",
opts = {},
}require("boundary").setup({
cmd = { "boundary-lsp" }, -- LSP server command
boundary_cmd = "boundary", -- CLI binary for commands
filetypes = { "go", "rust", "typescript", "java" },
root_markers = { ".boundary.toml", ".git" },
autostart = true, -- auto-start LSP on matching filetypes
})- Diagnostics — boundary violations appear as warnings/errors inline
- Hover — hover over a symbol to see its component and architectural layer
| Command | Description |
|---|---|
:BoundaryAnalyze [format] |
Full architecture report (text, json, or markdown) |
:BoundaryScore |
Architecture score in a floating window |
:BoundaryDiagram [type] |
Mermaid/DOT diagram (layers, dependencies, dot, dot-dependencies) |
:BoundaryCheck |
Pass/fail check with violation summary |
Add the score to your statusline (e.g., lualine):
require("lualine").setup({
sections = {
lualine_x = {
{ require("boundary.statusline").get },
},
},
})The score refreshes automatically when the LSP reports new diagnostics. Call require("boundary.statusline").refresh() to trigger a manual refresh.
- boundary CLI and
boundary-lspinstalled and on your$PATH - A
.boundary.tomlconfig file in your project root - Neovim >= 0.11
MIT