oo-ide 0.0.4

∞ is a terminal IDE focused on low distraction, high usability.
Documentation
//! Extension activation state — global / project / auto / disabled.

use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub(crate) enum ActivationState {
    /// Active in every project.
    Global,
    /// Active only in the current project.
    Project,
    /// `detect_project()` has not been called yet, or returned inconclusive.
    Auto,
    /// Explicitly disabled by the user.
    Disabled,
}

impl ActivationState {
    pub fn is_active(&self) -> bool {
        matches!(self, Self::Global | Self::Project)
    }
}