Druk integrates with the Language Server Protocol to bring diagnostics, inline problem messages, and autocompletion to any language that has a server. Druk ships no language servers itself — it spawns whatever commands are on yourDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/letstri/druk/llms.txt
Use this file to discover all available pages before exploring further.
PATH. A server that isn’t installed is reported once in the status bar and then ignored; it never crashes or delays the editor.
Enabling LSP
LSP is enabled by default. Setlsp: false in your config to disable it globally across all languages.
~/.config/druk/config.json
Features
Diagnostics
Errors and warnings from the language server are shown in the editor gutter, letting you see problems at a glance without leaving the file.
Inline problems
When
lspInline: true (default), the worst problem on each affected line is drawn as a message after the end of that line. Disable it with lspInline: false.Autocompletion
When
lspCompletion: true (default), a completion menu appears while you type. Press Ctrl+Space to trigger it manually. Requires lsp: true.Problem navigation
Jump between diagnostics with
problems.next and problems.prev (both unbound by default — assign them in keybindings). problems.list opens a full list.Default servers
Druk will spawn the following language servers automatically when a matching file is opened, provided the command is found on yourPATH.
| Server id | Command | File types |
|---|---|---|
typescript | typescript-language-server --stdio | TypeScript, TSX, JavaScript, JSX |
go | gopls | Go |
rust | rust-analyzer | Rust |
python | pyright-langserver --stdio | Python |
clangd | clangd | C, C++ |
zig | zls | Zig |
lua | lua-language-server | Lua |
bash | bash-language-server start | Bash |
ruby | solargraph stdio | Ruby |
php | intelephense --stdio | PHP |
swift | sourcekit-lsp | Swift |
css | vscode-css-language-server --stdio | CSS |
html | vscode-html-language-server --stdio | HTML |
json | vscode-json-language-server --stdio | JSON |
A server command that is not found on your PATH is reported once in the status bar and ignored. Druk never crashes or hangs due to a missing language server.
Overriding a server command
Use thelspServers setting to replace the default command for any server, keyed by its server id. This is useful when you want to use an alternative server (such as Deno’s LSP for TypeScript) or when your binary lives in a non-standard location.
~/.config/druk/config.json
Disabling a server
Set the command array to empty ([]) to disable a server entirely without turning off LSP globally:
~/.config/druk/config.json
Per-project server config
lspServers can also go in your project’s .druk/settings.json. Because lspServers is an object-valued setting, it replaces the entire user-level map for that project — not individual entries. If you want to keep user-level overrides and add a project-specific one, repeat them all in the project file.
<project>/.druk/settings.json
Settings page
The settings page (F1 → Settings) has toggle controls for each server. Toggling a server off sets its entry inlspServers to []; toggling it back on removes the override and restores the default command. This is the same lspServers key under the hood — you can mix UI and JSON edits freely.
Document sync
Druk uses full-text document sync: the entire file content is sent to the server on every change. This approach is simpler and impossible to desynchronize — there is no incremental patch state to go stale. ThedidChange notification is debounced, and the debounce captures the document path and text at the moment it starts, so switching to another tab during the wait can never re-aim an edit at the wrong document.