bynk-lsp 0.98.0

bynkc-lsp — the Language Server for the Bynk DSL.
bynk-lsp-0.98.0 is not a library.

bynk-lsp

crates.io License: MIT OR Apache-2.0

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 links the compiler's analysis libraries directly — bynk-ide (diagnostics + project analysis), bynk-check, bynk-syntax, and the bynk-fmt formatter — not the whole compiler binary. So the editor sees exactly the diagnostics bynkc check would report, without linking the CLI it doesn't need.

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

cargo install bynk-lsp

Or build from the workspace:

cargo build --release -p bynk-lsp   # → target/release/bynkc-lsp

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.