Skip to main content

Documentation 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.

Druk integrates with language servers you already have installed on your PATH. It spawns one server process per language as matching files are opened and communicates over the standard Language Server Protocol. This page documents every default server configuration: the server ID used to override or disable it in lspServers, the exact command Druk runs, and the filetypes that trigger it.

Default servers

Server IDDefault CommandFiletypes
typescripttypescript-language-server --stdiotypescript, typescriptreact, javascript, javascriptreact
gogoplsgo
rustrust-analyzerrust
pythonpyright-langserver --stdiopython
clangdclangdc, cpp
zigzlszig
lualua-language-serverlua
bashbash-language-server startbash
rubysolargraph stdioruby
phpintelephense --stdiophp
swiftsourcekit-lspswift
cssvscode-css-language-server --stdiocss
htmlvscode-html-language-server --stdiohtml
jsonvscode-json-language-server --stdiojson
Druk discovers language servers on your PATH — it does not install them itself. Install each server via your system package manager, language toolchain, or npm/pip/cargo as appropriate. If a server binary is not found, Druk simply skips LSP features for that language.

Overriding a server command

To use a different binary for a built-in server, set lspServers in your config with the server’s ID as the key and a command array as the value. For example, to use Deno’s built-in language server instead of typescript-language-server:
~/.config/druk/config.json
{
  "lspServers": {
    "typescript": ["deno", "lsp"]
  }
}
The saved file’s path is not appended to LSP commands — the array is the complete command Druk will exec. Make sure the server reads from stdin and writes to stdout (i.e. --stdio mode).

Disabling a server

Set a server’s command to an empty array [] to prevent Druk from spawning it at all. This is useful if you want LSP features for most languages but not a specific one:
~/.config/druk/config.json
{
  "lspServers": {
    "rust": []
  }
}
You can also toggle individual servers on and off from the Settings page (F1Settings) without editing the config file directly.

Adding an unsupported language server

Druk’s resolveServer function looks up a server by matching the open file’s filetype against each entry in the default server list. To point a filetype at a different server, override its existing server ID. For example, to run nil (a Nix language server) for Nix files you would need to first add Nix to the language registry — the override alone is not enough because the filetype must exist in the supported languages list before Druk can match it. For a fully new language and server combination, see Adding a language.
For the full LSP configuration guide — enabling and disabling features, tuning inline diagnostics, and controlling the completion menu — see LSP configuration.

Build docs developers (and LLMs) love