A Language Server Protocol (LSP) implementation for BundleWrap, providing intelligent editor support for BundleWrap repositories.
- Context-aware completions for bundle items, metadata, nodes, groups, and templates
- Item attributes (e.g.
owner,mode,content_type) with type-specific suggestions - Metadata keys from both static analysis and live repo metadata
- Bundle, node, and group names in method calls like
node.has_bundle() - Item references in
needs,triggers, andpreceded_by - Injected symbols (
node,repo,metadata, etc.) per file type - Node/repo properties and
repo.libs.*modules
- Item attributes (e.g.
- Diagnostics — undefined name detection aware of BundleWrap's injected symbols
- Two-tier metadata indexing — instant AST-based schema extraction plus background full-repo metadata resolution
Requires Python 3.10+.
pip install .
# or with uv
uv pip install .This installs the bw-lsp command.
The server communicates over stdio by default:
bw-lspTCP mode is also available:
bw-lsp --tcp --host 127.0.0.1 --port 2087A minimal VS Code extension is included (vscode-extension.js + vscode-package.json). It launches bw-lsp via stdio and activates on Python and TOML files. The server path is configurable via the bwLsp.serverPath setting.
- Install the LSP4IJ plugin.
- Go to Settings → Languages & Frameworks → Language Servers.
- Add a new server definition:
- Name: BundleWrap LSP
- Command:
bw-lsp - File mappings:
*.py(or scope it to your BundleWrap repo)
Any editor with LSP support can use bw-lsp. Point your editor's LSP client at the bw-lsp command using stdio transport.
uv pip install -e ".[dev]"
python -m pytest