bynk-lsp
The Language Server for the Bynk
language. The crate builds the bynkc-lsp binary, which any LSP-capable
editor can speak to for live diagnostics, navigation, and refactoring of .bynk
projects.
Built on tower-lsp, it shares the
compiler (bynkc) and formatter
(bynk-fmt) with the CLI, so the editor
sees exactly the diagnostics bynkc check would report.
Capabilities
- Diagnostics — re-runs the compiler on change and publishes errors and warnings with their dotted categories.
- Hover — type signatures and doc blocks.
- Go-to-definition and find references for types, functions, capabilities, services, and agents.
- Rename (workspace-wide, validated).
- Formatting and range formatting (via
bynk-fmt). - Document & workspace symbols, document highlights.
- Completion, inlay hints (inferred types), semantic tokens (type-aware highlighting), and code actions (quick fixes for suggested diagnostics).
- File watching across the project.
The full capability list is specified in
design/bynk-lsp-spec.md.
Install
Or build from the workspace:
This produces the bynkc-lsp binary. Requires a stable Rust toolchain,
2024 edition (MSRV 1.85).
Use
bynkc-lsp speaks LSP over stdio. Most users consume it through the
VS Code extension,
which bundles and launches it automatically. For other editors, point your LSP
client at the bynkc-lsp binary and associate it with the bynk language /
.bynk files. See
Set up editor support.
The server discovers a project by walking up to the nearest bynk.toml (falling
back to single-file mode if there is none). It logs to ~/.bynk-lsp.log at
warn by default; set BYNK_LSP_LOG (e.g. BYNK_LSP_LOG=debug) to raise the
level. bynkc-lsp --version prints the version.
License
Licensed under either of Apache-2.0 or MIT at your option.