Volt Docs Runtime configuration
← Back to Volt Docs

Runtime YAML

Configuration

Volt loads selected plugin settings from YAML files under user/. Edit workspace discovery, ACP clients, UI defaults, and oil behavior without recompiling the user library. The SDL shell watches these files and reloads them while the editor is running.

Overview

The compiled user library still owns package metadata, commands, hooks, and keybindings. For settings that change often, Volt also supports a runtime config layer implemented in user/config.rs.

No rebuild required. Changes to user/config.yaml and the referenced child files under user/config/ are picked up while Volt is running. Rust modules read the latest values through crate::config::load().

Theme colors and shared editor options still live in user/themes/*.toml and user/themes/global.toml. See the user packages guide for theme and statusline customization.


File layout

The master file is a reference table, not a YAML include. Volt reads user/config.yaml, then loads each child path listed there.

# user/config.yaml
workspace: config/workspace.yaml
acp: config/acp.yaml
ui: config/ui.yaml
oil: config/oil.yaml

At startup the host resolves the config root by walking upward from the executable directory and preferring the workspace user/ directory when a Cargo.toml is found nearby.

workspace.yaml Project picker search roots and depth limits.
acp.yaml Agent Client Protocol executables and launch args.
ui.yaml Picker truncation, ligatures, pane layout, terminal shell.
oil.yaml Directory browser defaults and keybindings.

Config sections

Click a card above or use the tabs below to inspect each child file. Every example matches the repository defaults in user/config/.

Workspace discovery

Consumed by user/workspace.rs when building the project picker.

# user/config/workspace.yaml
project_search_roots:
  - path: P:\
    max_depth: 4
  - path: W:\
    max_depth: 4
  - path: C:\Users\sam\
    max_depth: 4

Paths that do not exist on the current machine are filtered out automatically.

Plugins backed by YAML today

Plugin moduleConfig sectionWhat changes at runtime
workspace.rsworkspaceProject search roots and depth
acp.rsacpACP client list and launch commands
picker.rsuiPicker label truncation strategy
ligatures.rsuiFont ligature enablement
pane.rsui.paneGolden-ratio split sizing
terminal.rsui.terminalDefault shell program and args
oil.rsoilHidden files, sort mode, trash, chords

Hot reload

The SDL shell fingerprints user/config.yaml and every referenced child file on a short polling interval. When a file changes on disk, the next frame marks the config stale and plugin modules see the updated values the next time they call crate::config::load().

Packaged builds copy the user/ tree next to the executable, so edit the staged user/config/ directory beside volt when you are not running from a development checkout.


How plugins read config

First-party plugins do not parse YAML directly. They call the shared loader and map typed sections into SDK exports:

// user/oil.rs
pub fn feature_spec() -> OilFeatureSpec {
    let config = crate::config::load().oil;
    OilFeatureSpec {
        defaults: config.defaults.oil_defaults(),
        keybindings: config.keybindings.oil_keybindings(),
        // ...
    }
}
// user/terminal.rs
pub fn default_shell_program() -> String {
    let terminal = crate::config::load().ui.terminal;
    if terminal.program.trim().is_empty() {
        default_shell_program_fallback()
    } else {
        terminal.program
    }
}

Add config to your plugin

To expose YAML-backed settings for a new or existing plugin, extend the shared loader in user/config.rs and read it from your module.

Create user/config/myplugin.yaml and add a pointer in the master file:

# user/config.yaml
myplugin: config/myplugin.yaml

Commands, hooks, and keybindings still require a rebuild because they are compiled into the user shared library. YAML is for data that should change quickly: launch commands, search roots, truncation modes, and feature defaults.