Module user_config

Module user_config 

Source
Expand description

User-specific configuration for nextest.

User config stores per-user preferences that shouldn’t be version-controlled, like UI preferences and default output settings. This is separate from the repository config (.config/nextest.toml) which controls test execution behavior.

§Config file location

The user config file is searched for in the following locations:

  • Unix/macOS: $XDG_CONFIG_HOME/nextest/config.toml or ~/.config/nextest/config.toml
  • Windows: %APPDATA%\nextest\config.toml, with fallback to ~/.config/nextest/config.toml for dotfiles portability

On Windows, both locations are checked in order, and the first existing config file is used. This allows users to share dotfiles across platforms.

§Configuration hierarchy

Settings are resolved in the following order (highest priority first):

  1. CLI arguments (e.g., --show-progress=bar)
  2. Environment variables (e.g., NEXTEST_SHOW_PROGRESS=bar)
  3. User overrides (first matching [[overrides]] for each setting)
  4. User base config ([ui] section)
  5. Built-in defaults

Modules§

elements
User config elements.

Structs§

EarlyUserConfig
Early user configuration for pager settings.
ExperimentalConfig
Deserialized experimental config from user config file.
UnknownUserExperimentalError
Error returned when parsing an unknown experimental feature name.
UserConfig
User configuration after custom settings and overrides have been applied.

Enums§

UserConfigExperimental
User-level experimental features.
UserConfigLocation
Specifies where to load user configuration from.

Constants§

USER_CONFIG_NONE
Special value for --user-config-file and NEXTEST_USER_CONFIG_FILE that skips user config loading entirely.

Functions§

user_config_paths
Returns candidate paths for the user config file, in order of priority.