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.

All settings live in two files: ~/.config/druk/config.json for your personal preferences (written and read for every project you open) and <project>/.druk/settings.json for per-project overrides. The project file only needs to contain the keys it overrides — anything it omits falls back to your user value. A missing or invalid key in either file is silently replaced with its default, so a hand-edited config can never prevent Druk from starting.

Appearance

theme
ThemeName
default:"dark"
Active color scheme. Pick any of the 26 built-in themes. Changing this from the Settings page also sets themeSync to false so the OS appearance can no longer undo the pick.Valid values: dark, light, ayu-dark, ayu-mirage, ayu-light, catppuccin-mocha, catppuccin-macchiato, catppuccin-frappe, catppuccin-latte, dracula, everforest-dark, everforest-light, gruvbox, gruvbox-light, kanagawa-wave, kanagawa-dragon, kanagawa-lotus, nord, one-dark, rose-pine, rose-pine-moon, rose-pine-dawn, solarized-dark, solarized-light, tokyo-night, vesper
themeSync
boolean
default:"true"
Follow the OS light/dark appearance automatically. When enabled, themeLight and themeDark take over and theme becomes whichever of the two is on screen. Manually picking a theme from the Settings page turns this off, because the poll would otherwise undo the pick on the next appearance change.
themeLight
ThemeName
default:"light"
The theme Druk switches to when the OS reports a light appearance and themeSync is enabled. Accepts the same values as theme.
themeDark
ThemeName
default:"dark"
The theme Druk switches to when the OS reports a dark appearance and themeSync is enabled. Accepts the same values as theme.
transparent
boolean
default:"false"
Leave the editor, tab strip, and sidebar backgrounds unpainted so a translucent terminal window shows through them. Floating panels — the command palette, modals, and the Settings page — stay painted regardless, since the editor would otherwise be visible straight through them.

Editor

vim
boolean
default:"false"
Enable vim modal editing with Normal, Insert, and Visual modes. Supports hjkl, w, b, 0, $, gg, G, counts, i a o, x dd dw cw, v + d y c, yy p P, and u / Ctrl+R for undo/redo.
tabSize
number
default:"2"
Number of spaces per indent level, used by the Tab key and indent guides. Must be an integer between 1 and 16. Note: a literal tab character always renders as two columns in OpenTUI’s renderer regardless of this setting.
trimOnSave
boolean
default:"false"
On every save, strip trailing whitespace from all lines and ensure the file ends with exactly one newline. Applied before formatOnSave runs.
formatOnSave
boolean
default:"false"
After saving a file, run whichever formatters command matches its extension. The formatter must rewrite the file in place. Has no effect if no matching formatter is configured.
formatters
Record<string, string[]>
default:"{}"
Formatter commands keyed by comma-separated file extensions (e.g. "ts,tsx") or "*" to match any file. The saved file’s absolute path is appended to the command before it runs — the command must rewrite the file in place. An empty array [] for a key disables that entry.
{
  "formatters": {
    "ts,tsx": ["prettier", "--write"],
    "go": ["gofmt", "-w"],
    "*": ["my-formatter", "--fix"]
  }
}
autoSaveOnBlur
boolean
default:"true"
Automatically save every dirty buffer when the terminal window loses focus or when you switch away from a tab. This means unsaved work is preserved even if you close the terminal without explicitly saving.

Interface

sidebarWidth
number | 'auto'
default:"\"auto\""
Width of the file tree in terminal columns. "auto" computes 25% of the terminal width, clamped between 30 and 60 columns — wide enough to show deep paths on a large screen, not greedy on a narrow one. Dragging the sidebar divider or pressing [ / ] in the tree pins an explicit column count. Valid explicit range: 1580.
diffView
"inline" | "split"
default:"\"inline\""
Layout for the diff view. "inline" shows additions and deletions in a single column of +/- rows. "split" places the old and new versions side by side. You can also toggle this with Tab while the diff panel is open.
gitPanelView
"tree" | "list"
default:"\"tree\""
Layout for the source-control panel (Ctrl+Opt+G). "tree" nests changed files under their parent folders. "list" shows one flat list of paths.
showDotfiles
boolean
default:"true"
Whether the file tree lists dotfiles (files and folders whose name starts with .). Set to false to hide them.
respectGitignore
boolean
default:"false"
When true, files and directories matched by any .gitignore in the project are hidden from the file tree. Off by default so the tree always shows what is on disk.

LSP

lsp
boolean
default:"true"
Master switch for all language server features. When false, Druk spawns no servers, shows no diagnostics, and the lspInline, lspCompletion, and lspServers settings have no effect.
lspInline
boolean
default:"true"
Draw the worst diagnostic message for a line inline, after the end of that line, so you can read the error without opening the diagnostics panel. Requires lsp to be true.
lspCompletion
boolean
default:"true"
Show the autocompletion menu while typing and on Ctrl+Space. Requires lsp to be true.
lspServers
Record<string, string[]>
default:"{}"
Per-server command overrides, keyed by server ID (see the LSP Servers reference for IDs and defaults). Set a key to a custom command array to replace the default binary, or to an empty array [] to disable that server entirely.
{
  "lspServers": {
    "typescript": ["deno", "lsp"],
    "rust": []
  }
}

Keybindings

keybindings
Record<string, string>
default:"{}"
Custom keyboard shortcuts keyed by command ID. Each value is a single chord string (e.g. "Ctrl+Opt+K") that replaces the default binding for that command. Set a value to "" or "none" to remove a command’s binding entirely. Command IDs and their defaults are defined in src/app/keymap.ts; the Settings page (F1Keyboard shortcuts) also lets you edit these without knowing the IDs.
{
  "keybindings": {
    "git.commit": "Ctrl+Opt+C",
    "editor.toggleComment": "none"
  }
}

Complete example

The following example shows a fully customized ~/.config/druk/config.json. Any key you omit will use its default value.
~/.config/druk/config.json
{
  "theme": "tokyo-night",
  "themeSync": false,
  "transparent": false,
  "vim": true,
  "tabSize": 4,
  "trimOnSave": true,
  "formatOnSave": true,
  "formatters": {
    "ts,tsx": ["prettier", "--write"],
    "go": ["gofmt", "-w"]
  },
  "autoSaveOnBlur": true,
  "sidebarWidth": "auto",
  "diffView": "inline",
  "gitPanelView": "tree",
  "showDotfiles": true,
  "respectGitignore": false,
  "lsp": true,
  "lspInline": true,
  "lspCompletion": true,
  "lspServers": {
    "rust": []
  },
  "keybindings": {
    "git.commit": "Ctrl+Opt+C"
  }
}
And a minimal project override file that only pins tabSize for the project without affecting anything else:
<project>/.druk/settings.json
{
  "tabSize": 4,
  "formatOnSave": true
}
The skipUpdate key also exists in the config — it stores the version whose update banner was last dismissed. It is written automatically by Druk and does not need to be set by hand.

Build docs developers (and LLMs) love