ix/config.rs
1//! Configuration loading for ix.
2
3use serde::{Deserialize, Serialize};
4use std::path::PathBuf;
5
6/// ix runtime configuration.
7#[derive(Debug, Serialize, Deserialize)]
8pub struct Config {
9 /// Root directories to watch for indexing.
10 pub watch_roots: Vec<PathBuf>,
11 /// Glob patterns for paths to exclude from indexing.
12 pub exclude_patterns: Vec<String>,
13}
14
15impl Default for Config {
16 fn default() -> Self {
17 Self {
18 watch_roots: Vec::new(),
19 exclude_patterns: vec![
20 ".git".to_string(),
21 "node_modules".to_string(),
22 "target".to_string(),
23 ],
24 }
25 }
26}