Configuration
Krait works with zero config for single-language projects. For monorepos or custom setups, krait.toml gives you full control.
Generating Config
Section titled “Generating Config”krait init # auto-detect and write krait.tomlkrait init --dry-run # preview without writingkrait init --force # overwrite existing configConfig Location
Section titled “Config Location”Krait looks for config in this order:
krait.tomlin the project root.krait/config.tomlin the project root- Auto-detection (fallback)
Schema
Section titled “Schema”# krait.toml — generated by `krait init`
# Optional: override the project root# root = "."
# Workspaces to index. Each gets its own LSP server.[[workspace]]path = "packages/api"language = "typescript"
[[workspace]]path = "packages/web"language = "typescript"
[[workspace]]path = "backend"language = "go"
# Optional: server overrides# [servers.typescript]# binary = "vtsls"# args = ["--stdio"]Fields
Section titled “Fields”workspace
Section titled “workspace”| Field | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Relative path to workspace root |
language | string | Yes | Language: typescript, javascript, go, rust, cpp |
server | string | No | LSP server binary override for this workspace |
servers.<lang>
Section titled “servers.<lang>”| Field | Type | Description |
|---|---|---|
binary | string | Server binary name (must be in PATH or managed dir) |
args | string[] | Arguments (default: ["--stdio"]) |
Status Output
Section titled “Status Output”When config is loaded, krait status shows:
daemon: pid=12345 uptime=5mconfig: krait.toml (5 workspaces)lsp: 5 sessionsWhen auto-detected:
daemon: pid=12345 uptime=5mlsp: 5 sessionsCommitting to Git
Section titled “Committing to Git”It’s recommended to commit krait.toml to your repository. This ensures the whole team uses the same workspace configuration:
git add krait.tomlgit commit -m "chore: add krait config"