Skip to content

Configuration File

You can customize or override the default behavior of KireiSakura-Kit using configuration files.

The configuration is done in YAML format.

Warning

Config System is not yet implemented.

Configuration Files

KireiSakura-Kit supports two levels of configuration : -

  • Applies to all projects, overriding default settings.
  • Primary Location: $XDG_CONFIG_HOME/kireisakura-kit/config.yml
  • Fallback Location: ~/.config/kireisakura-kit/config.yml (used if $XDG_CONFIG_HOME is not set)
  • Applies only to the current project.
  • Has the highest priority, overriding both default & global settings.
  • Location: <project_root>/config.yml
This config file's name can be changed!

What if we want to change the project config file's name?

  • You can set a custom name using the global config option: Project.config_file.

Loading Process

  • The options set in config file overwrites their default values set by the Kit.
  • Options in Project config file overwrite global & default values.

graph TD
    B{{Is XDG_CONFIG_HOME env variable set?}}
    B -- Yes --> C[Use<br>XDG_CONFIG_HOME/KireiSakura-Kit/config.yml]
    B -- No --> D[Use<br>$HOME/.config/KireiSakura-Kit/config.yml]
    C --> E[Load global config values.<br>Overwriting default values.]
    D --> E
    E --> F{{'config.toml' file present in current project root?}}
    F -- Yes --> G[Load project config values.<br>Overwrite global ones present in this.]
    F -- No --> H[Use global config values]
    G --> I[Use loaded config values]
    H --> I