1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! Configuration: file discovery, loading, schema, resolution, and the
//! introspection / management commands (`--show-config`, `--dump-*`,
//! `--init-config`, `--upgrade-config`, `--save-as`).
//!
//! lx looks for a TOML config file in these locations (first found wins):
//!
//! 1. `$LX_CONFIG` — explicit path override
//! 2. `~/.lxconfig.toml` — simple home directory location
//! 3. `$XDG_CONFIG_HOME/lx/config.toml` (default `~/.config/lx/config.toml`)
//! 4. `~/Library/Application Support/lx/config.toml` (macOS only)
//!
//! ## Module layout
//!
//! - [`error`] — `ConfigError` and the `IoResultExt` helper trait.
//! - [`store`] — process-wide `OnceLock` storage; `init_config()` and
//! `config()`.
//! - [`schema`] — on-disk types: `Config`, `PersonalityDef`, `ThemeDef`,
//! `StyleDef`, `ConditionalOverride`, `StringOrList`, plus version
//! constants.
//! - [`settings`] — the master `SETTING_FLAGS` table mapping config
//! keys to CLI flags.
//! - [`load`] — config file discovery, TOML parsing, drop-in directory,
//! `[[when]]` evaluation helpers.
//! - [`personality`] — `resolve_personality()`, compiled-in personality
//! defaults, and the `--dump-personality` / `--save-as` output paths.
//! - [`themes`] — `BUILTIN_THEMES` registry and `--dump-theme` output.
//! - [`styles`] — compiled-in `exa` style, `resolve_style()`, and
//! `--dump-style` output.
//! - [`classes`] — compiled-in file-type classes, `resolve_classes()`,
//! and `--show-class` output.
//! - [`formats`] — compiled-in column formats, `resolve_formats()`, and
//! `--show-format` output.
//! - [`init`] — `--init-config`: write the default config file.
//! - [`show`] — `--show-config`: human-readable overview.
//! - [`upgrade`] — `--upgrade-config`: schema version migration.
// ── Public re-exports ───────────────────────────────────────────
//
// Only items reached from outside the config module are re-exported
// here. Submodule-internal types (PersonalityDef, StringOrList,
// CONFIG_VERSION, BUILTIN_THEMES, etc.) stay accessible to other
// config submodules via `super::` but are not part of the
// crate-level API.
pub use ConfigError;
pub use ;
pub use ;
pub use ;
pub use find_config_path;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use show_config;
pub use upgrade_config;