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’s configuration is split into two layers — a user-level file that holds every setting, and an optional per-project file that overrides only what that project needs. Changes in either file take effect immediately without restarting the editor, and any unknown or invalid value falls back to a safe default so a hand-edited config can never break startup.

Config file locations

User config

~/.config/druk/config.jsonAlso respects $XDG_CONFIG_HOME/druk/config.json when XDG_CONFIG_HOME is set. Holds every setting and is rewritten whole when you change something.

Project config

<project>/.druk/settings.jsonLives beside your project, the way .vscode/ does. Only needs the keys you want to override — everything else falls through to your user config.

Opening settings

You can reach the settings page without touching a config file at all:
  • F1 → Settings — opens the user-level settings page
  • F1 → Project Settings — opens the project-level overrides page

In-editor controls

On the settings page, and step through discrete values (toggling a boolean, cycling through the possible string options), while Enter opens a filterable list of every available value for that setting — the recommended way to pick a theme without pressing an arrow key 26 times. Every change applies immediately and is persisted to the appropriate config file.

Two-layer behavior

When Druk resolves your configuration, it starts with your user settings and applies project overrides on top, key by key. A key the project file omits keeps your user value. Clearing a project override in the settings page removes the key entirely from .druk/settings.json, which restores your user value immediately — no restart required.
Object-valued settings — formatters and lspServers — are replaced whole by the project file rather than merged entry by entry. A project that sets formatters replaces your entire user-level formatter map for that project.

Resilience

Every field goes through a validator before it is accepted. An unknown key is silently skipped; a value that fails its validator falls back to the default. This means a hand-edited config with a typo or an outdated field name never prevents Druk from starting.

Settings reference

The project settings file only needs the keys you are overriding. You do not need to include every setting — keys you omit inherit their value from your user config.

Appearance

SettingDefaultDescription
theme"dark"Color scheme id. See Themes for all 26 options.
themeSynctrueFollow the OS light/dark appearance automatically; themeLight and themeDark control which theme each mode uses.
themeLight"light"Theme used while the OS is in light mode and themeSync is on.
themeDark"dark"Theme used while the OS is in dark mode and themeSync is on.
transparentfalseLeave the editor, tab strip, and sidebar backgrounds unpainted so a translucent terminal shows through. Floating panels (palette, modals, settings page) always stay painted.

Editor

SettingDefaultDescription
vimfalseEnable vim modal editing (normal / insert / visual).
tabSize2Columns per indent level for space indentation. Accepts an integer from 1 to 16.
sidebarWidth"auto"Columns the file tree occupies. "auto" uses a quarter of the terminal width (clamped to 30–60). Resizing with [ / ] or by dragging the divider pins an explicit number.

Saving

SettingDefaultDescription
trimOnSavefalseStrip trailing spaces and ensure the file ends with exactly one newline on save. Runs before the formatter.
formatOnSavefalseRun the matching formatters command after saving a file.
formatters{}Formatter commands keyed by comma-separated extensions (e.g. "ts,tsx") or "*" for any file. See Formatters.
autoSaveOnBlurtrueSave every dirty buffer when you switch tabs or when the terminal window loses focus.

Git and file tree

SettingDefaultDescription
diffView"inline"How the diff view lays out changes. "inline" shows a single column of +/- rows; "split" shows two columns side by side.
gitPanelView"tree"Source-control panel layout. "tree" nests changed files under folders; "list" shows one flat list of paths.
showDotfilestrueShow dotfiles in the file tree.
respectGitignorefalseHide git-ignored files from the file tree.

Language servers

SettingDefaultDescription
lsptrueEnable language servers. Set to false to disable globally.
lspInlinetrueDraw the worst problem’s message after the end of its line in the editor.
lspCompletiontrueShow an autocompletion menu while typing. Requires lsp: true. Ctrl+Space triggers it manually.
lspServers{}Per-server command override, keyed by server id. An empty array disables that server. See LSP.

Keybindings

SettingDefaultDescription
keybindings{}Custom keyboard shortcuts. A map of command id → chord string. An empty value or "none" removes the binding. See Keybindings.

Updates

SettingDefaultDescription
skipUpdate""Version string whose update banner was dismissed. Druk writes this value automatically — you do not need to set it by hand.

Config file examples

{
  "theme": "catppuccin-mocha",
  "themeSync": false,
  "tabSize": 2,
  "vim": false,
  "transparent": false,
  "trimOnSave": true,
  "formatOnSave": true,
  "formatters": {
    "ts,tsx,js,jsx": ["prettier", "--write"],
    "go": ["gofmt", "-w"]
  },
  "autoSaveOnBlur": true,
  "diffView": "inline",
  "gitPanelView": "tree",
  "showDotfiles": true,
  "respectGitignore": false,
  "lsp": true,
  "lspInline": true,
  "lspCompletion": true,
  "lspServers": {},
  "keybindings": {}
}
In the project file above, only tabSize, trimOnSave, and formatters are overridden. Every other setting — theme, vim, lsp, and so on — keeps its value from the user config.

Build docs developers (and LLMs) love