[lsp.rust]
command = "rust-analyzer"
args = []Every portable built-in recipe is enabled when no configuration is present. Missing executables are reported by :health, and opening a file only starts the server for that file's language. kvim can install reviewed servers into its own per-user data directory; a [lsp.<language>] table always remains the highest-precedence override.
Use :lsp restart to retire every started or failed language server and start fresh processes for open buffers. This is useful after changing project-owned server configuration outside kvim. The command keeps kvim's current launch recipes; restart kvim itself to reload changes to kvim/config.toml.
The :health LSP section lists every filetype kvim recognizes. Filetypes with a portable recipe are active by default; the remaining rows are marked as custom-server-only and show the [lsp.<filetype>] key to use. Active rows expand with the executable probe, connection state, attached-buffer count, diagnostics, and any complete failure reason.
Managed installation
Use :lsp install to install a language server without modifying the project, the system PATH, or a global package-manager environment. With no argument, kvim proposes the focused file's recipe or opens a recipe picker. A language config key selects one directly:
:lsp install
:lsp install rust
:lsp install python
Every operation shows the pinned version, affected languages, destination, and integrity policy before asking for confirmation. Downloading, verification, extraction, and package installation run on a bounded background worker. Esc cancels cooperatively. A completed install is activated in the running editor; an explicit [lsp.<language>] override is reported and left active.
:lsp update [language] installs the version pinned by the current kvim build when it is newer than the managed version. Bare :lsp update lists only outdated managed recipes. :lsp uninstall [language] removes a managed recipe and restores the built-in PATH recipe where one exists. Updates and removals retire a running managed server before replacing its files, which also permits safe cleanup on Windows.
The platform data directory contains lsp/manifest.toml, versioned tools, and shared runtimes. Download and package-manager caches use the platform cache directory. Health reports each active server's source and version. Startup precedence is:
- explicit
[lsp.<language>]configuration; - a valid managed manifest entry;
- the built-in
PATHrecipe.
A malformed, stale, path-escaping, or unsupported manifest is ignored with a startup warning rather than weakening path confinement or preventing kvim from opening. Managed commands and path arguments must resolve inside the managed root.
| Managed recipe | Pinned version | Platforms | Runtime |
|---|---|---|---|
| rust-analyzer | 2026-08-17.4 | Windows, macOS, glibc Linux; x86-64 and arm64 | Native release |
| TypeScript Language Server + TypeScript | 5.3.0 + 6.0.3 | Windows, macOS, glibc Linux; x86-64 and arm64 | Managed Node 22.18.0 |
| Bash Language Server | 5.6.0 | Windows, macOS, glibc Linux; x86-64 and arm64 | Managed Node 22.18.0 |
| VS Code HTML Language Server | 4.10.0 | Windows, macOS, glibc Linux; x86-64 and arm64 | Managed Node 22.18.0 |
| BasedPyright | 1.39.9 | Windows, macOS, glibc Linux; x86-64 and arm64 | Managed Node 22.18.0 |
| CMake Language Server | 0.1.11 | Windows, macOS, Linux; x86-64 and arm64 | Isolated venv from system Python 3.8-3.13 |
Managed archives and top-level npm/Python packages are downloaded over HTTPS and checked against recipe-owned SHA-256 or SHA-512 values. Archive extraction rejects traversal, links/reparse points, special entries, oversized downloads, decompression bombs, and excessive entry/path counts. npm uses the managed Node runtime directly, disables scripts/audit/funding/update checks, records a lockfile without extracting dependencies, verifies the complete dependency graph against a recipe-owned digest, then installs exactly that lock with scripts disabled. The CMake recipe creates a copied isolated venv and accepts only binary wheels; it does not mutate the detected system Python. The reviewed Node and rust-analyzer Linux artifacts require glibc; musl hosts receive an unsupported-target message rather than an installation that cannot launch.
clangd is intentionally not managed because official packages are full LLVM distributions hundreds of MiB larger than the server alone. Install LLVM for the platform and expose clangd through PATH, or configure [lsp.cpp]. PowerShell Editor Services still requires an installation-specific pwsh and script path, so it remains the manual recipe documented below. Health and an explicit :lsp install cpp/:lsp install powershell report that guidance.
Limiting clangd background indexing
When clangd discovers a large compile_commands.json, it indexes every translation unit in that database by default. To keep diagnostics and completion for open files while disabling that work for one source tree, add a path-scoped fragment to clangd's user configuration:
If:
PathMatch: 'C:/large/source/tree/.*'
Index:
Background: Skipclangd user configuration is stored at %LocalAppData%\clangd\config.yaml on Windows, ~/Library/Preferences/clangd/config.yaml on macOS, and $XDG_CONFIG_HOME/clangd/config.yaml on Linux (typically ~/.config/clangd/config.yaml). User-config paths are absolute, use forward slashes on every platform, and are regular expressions matched against the complete path. Existing fragments can be separated with ---. Use :lsp restart if the running server does not pick up the change immediately.
To disable background indexing for every C/C++ project instead, override the launch arguments globally in Kvim:
[lsp.cpp]
command = "clangd"
args = ["--background-index=0"]Server progress
Kvim advertises standard LSP work-done progress support. While the language server attached to the focused buffer reports active work, such as clangd background indexing, the LSP service icon in the status bar becomes an animated spinner. The normal ready icon returns when every reported operation ends.
Progress from servers attached only to inactive filetypes does not animate the focused buffer's status. Kvim processes a bounded number of server requests and notifications per frame, retains only a bounded set of progress tokens, and clears progress when a server finishes, fails, restarts, or is removed.
Contextual diagnostics and documentation
Normal-mode K opens diagnostics for the cursor line followed by LSP hover documentation. With [editor] diagnostic_tooltips = true (the default), the same tooltip appears automatically after the cursor rests for 500 ms. <space>th toggles automatic display for the current session. Pressing Esc keeps a dismissed tooltip or diagnostics panel closed at that cursor position; automatic display is re-enabled after the cursor moves.
Document outline
<space>o opens a hierarchical outline for the focused document. Valid LSP textDocument/documentSymbol results take precedence; while a server is unavailable, unsupported, starting, failed, or returns no symbols, kvim derives the outline from the buffer's incremental tree-sitter tree. Every bundled language has a structural fallback query.
Unicode mode shows symbol-kind glyphs and syntax-theme colors in the outline and breadcrumb; ASCII mode keeps textual kind labels. The deepest breadcrumb segment is bold. Press / in the outline to filter symbol names case-insensitively while retaining their ancestors. Enter finishes query entry and keeps the filtered rows; Esc during query entry clears the filter and restores the pre-search preview.
Completion sources
Ctrl-Space in Insert mode merges candidates from four sources:
- the opt-in GitHub Copilot Language Server, ranked first;
- the configured language server for the focused buffer;
- contextual relative paths such as
./src/ma, resolved from the current file's directory (or the launch directory for a scratch buffer); - identifier-like tokens from every open buffer, with the focused buffer ranked first.
All four completion sources are enabled by default and can be disabled independently:
[completion]
lsp = true
copilot = true
paths = true
buffer_tokens = trueBuffer candidates are available immediately. LSP, Copilot, and directory requests resolve in the background and merge into the same menu without blocking typed input. Copilot remains inactive unless its separate opt-in service is enabled; see GitHub Copilot completion for installation, authentication, privacy, and Windows launch details. A spinner row makes pending requests visible; if no source can provide a candidate, the status bar reports that explicitly instead of failing silently. Unicode mode uses compact source icons; [editor] glyph_profile = "ascii" selects L, C, P, and B badges instead.
LSP completion rows preserve the server's label details, so functions and methods show their parameter and return-type signatures beside the candidate name. The displayed signature is separate from the insertion text and is never inserted by accepting a candidate. Source badges use distinct LSP/path/buffer colors, candidate names reuse syntax-theme colors for functions, variables, types, and keywords, and signature/path details use the muted gutter color.
Inlay hints
LSP parameter-name and inferred-type hints are enabled by default. They are requested asynchronously for the focused buffer and cached by buffer revision; late responses from an older revision are discarded. <space>ti toggles them for the running session, and the startup default is configurable:
[editor]
lsp_inlay_hints = true
inlay_hints_italic = trueHints are virtual text: they are not inserted into the buffer, copied, searched, or sent back to the language server. They participate in the same display layout as source text, so wrapping, tabs, wide characters, clipping, syntax overlays, and cursor placement remain aligned. Servers may return other LSP inlay-hint kinds, but kvim currently renders only parameter and type. While an edit-triggered refresh is pending, unaffected cached hints remain visible and their byte anchors are rebased through the buffer's recent edits. Hints touched by deleted/replaced text are removed immediately, and a current server response replaces the retained set atomically. This avoids per-keystroke flicker without painting cached hints at stale positions. Rendered Markdown suppresses hints while its projected view is active. workspace/inlayHint/refresh is not handled yet; edits and buffer focus changes trigger normal recomputation.
Editor text styles
Inlay hints use italics and tree-sitter keyword captures use bold text by default. Both terminal attributes can be disabled independently:
[editor]
inlay_hints_italic = true
syntax_keywords_bold = trueThese settings affect presentation only; they do not change which hints or syntax captures are produced.
Env files
.env, .env.*, and *.env files use a dotenv-specific tree-sitter query for assignment keys, values, comments, interpolation, export, and =. kvim does not attach Bash Language Server to these files because dotenv syntax is only a restricted shell-like format. No dedicated server recipe is bundled; an externally installed compatible server can still be configured explicitly under [lsp.env] and receives the dotenv language ID.
Windows resource files
*.rc files use kvim's dedicated Windows resource tree-sitter grammar, which covers preprocessor directives, resource declarations, nested BEGIN/END blocks, identifiers, strings, numbers, operators, and comments. No language server recipe is bundled; an externally installed compatible server can be configured under [lsp.rc] and receives the rc language ID.
Validation status
The repository's parameterized smoke test runs the same initialize/initialized path as the editor, then performs the specification's acknowledged shutdown followed by exit:
cargo run -p kvim-core --example lsp_handshake -- <command> [args...]
| Recipe | macOS arm64 | Linux | Windows | Enabled by default |
|---|---|---|---|---|
| BasedPyright 1.39.9 | Passed 2026-07-31 | Pending | Pending | Yes |
| Apple clangd 17.0.0 | Passed 2026-07-31 | Pending | Pending | Yes |
| Bash Language Server 5.6.0 | Passed 2026-07-31 | Pending | Pending | Yes |
| TypeScript Language Server 5.3.0 + TypeScript 6.0.3 (TS/TSX/JS) | Passed 2026-07-31 | Pending | Pending | Yes |
VS Code HTML Language Server (vscode-langservers-extracted 4.10.0) |
Passed 2026-07-31 | Pending | Pending | Yes |
| PowerShell Editor Services 4.7.0 + PowerShell 7.6.4 | Passed 2026-07-31 | Pending | Pending | No |
| CMake Language Server | Pending | Pending | Pending | Yes |
Each macOS pass exercised an absolute executable path and command lookup through PATH. Defaults describe launch recipes, not bundled dependencies: the remaining handshake cells document validation coverage while :health reports whether each executable is available on the current machine.
Built-in and manual recipes
The equivalent built-in tables are shown here for reference and can be copied into config.toml when an override is needed. For recipes supported above, managed installation is usually simpler; the built-ins remain the fallback for existing system installations.
# https://docs.basedpyright.com/latest/installation/command-line-and-language-server/
[lsp.python]
command = "basedpyright-langserver"
args = ["--stdio"]
# https://clangd.llvm.org/installation.html
[lsp.cpp]
command = "clangd"
args = []
# https://github.com/bash-lsp/bash-language-server
[lsp.bash]
command = "bash-language-server"
args = ["start"]
# https://github.com/typescript-language-server/typescript-language-server
[lsp.typescript]
command = "typescript-language-server"
args = ["--stdio"]
# TSX has a distinct document language ID and currently needs its own table.
[lsp.tsx]
command = "typescript-language-server"
args = ["--stdio"]
# JavaScript has its own parser, config key, and document language ID.
[lsp.javascript]
command = "typescript-language-server"
args = ["--stdio"]
# https://github.com/hrsh7th/vscode-langservers-extracted
[lsp.html]
command = "vscode-html-language-server"
args = ["--stdio"]
# https://github.com/regen100/cmake-language-server
[lsp.cmake]
command = "cmake-language-server"
args = []typescript-language-server also requires a compatible typescript package. The macOS validation used TypeScript 6.0.3. TypeScript 7.0.2 does not contain the tsserver files that Language Server 5.3.0 expects and is rejected during initialization; verify upstream compatibility before upgrading that pairing. vscode-html-language-server is distributed by the community-maintained vscode-langservers-extracted package.
Windows npm launchers
npm normally exposes package binaries through .cmd and .ps1 shims on Windows. kvim deliberately does not invoke a command shell, so those shims are not portable direct-process commands. Managed recipes already launch their managed node.exe and JavaScript entry point directly. For a custom npm installation, configure node.exe and the package's JavaScript entry point instead. For example, after replacing the paths with those from the local npm installation:
[lsp.typescript]
command = 'C:\Program Files\nodejs\node.exe'
args = [
'C:\Users\you\AppData\Roaming\npm\node_modules\typescript-language-server\lib\cli.mjs',
"--stdio",
]The same rule applies to bash-language-server and vscode-html-language-server. A configured absolute command path is preferable when kvim is started from a GUI whose PATH differs from an interactive shell.
PowerShell and JSX limitations
PowerShell Editor Services has no installation-independent executable recipe. Download a release, then configure the absolute Start-EditorServices.ps1 path for that installation:
[lsp.powershell]
command = "pwsh"
args = [
"-NoLogo",
"-NoProfile",
"-File",
'C:\Tools\PowerShellEditorServices\PowerShellEditorServices\Start-EditorServices.ps1',
"-SessionDetailsPath",
'C:\Users\you\AppData\Local\kvim\PowerShellEditorServices.json',
"-Stdio",
]See the PowerShell Editor Services releases and installation instructions. The script and session-details paths differ by installation and must be replaced in the example. An explicit session-details path prevents Editor Services from writing PowerShellEditorServices.json into the project cwd. The macOS validation used checksum-verified portable release archives and passed this exact pwsh -File ... -SessionDetailsPath ... -Stdio shape through both an absolute pwsh path and PATH lookup. This does not make the script location portable, so PowerShell remains a documented template rather than registry metadata.
JavaScript uses a distinct parser and the javascript LSP document ID for .js, .mjs, and .cjs. JSX remains unmapped: it needs a javascriptreact document ID and must not be folded into plain JavaScript or TSX invisibly.
Overrides
Any [lsp.<language>] table replaces kvim's built-in recipe for that language. For example, a custom Rust installation can be selected without changing the other defaults:
[lsp.rust]
command = "/absolute/path/to/rust-analyzer"
args = []Commands and arguments are passed literally. Shell quoting, pipes, environment assignments, and command substitution are not interpreted.