/ src / constants.rs
constants.rs
 1  //! Constants used throughout the codebase.
 2  //!
 3  //! Centralizing magic numbers improves maintainability and discoverability.
 4  
 5  /// Weight factor for converting multi-line ranges to a 1D size.
 6  /// Lines are weighted more heavily than characters within a line.
 7  pub const RANGE_SIZE_LINE_WEIGHT: u64 = 10000;
 8  
 9  /// Maximum depth for resolving binding chains to prevent infinite loops.
10  pub const MAX_CHAIN_DEPTH: usize = 10;
11  
12  /// Debounce interval for document change analysis (milliseconds).
13  pub const CHANGE_DEBOUNCE_MS: u64 = 300;
14  
15  /// Heartbeat interval for background tasks (seconds).
16  pub const HEARTBEAT_INTERVAL_SECS: u64 = 30;