mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
28 lines
725 B
Rust
28 lines
725 B
Rust
use anyhow;
|
|
use schemars::JsonSchema;
|
|
use serde::{Deserialize, Serialize};
|
|
use settings::Setting;
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct SemanticIndexSettings {
|
|
pub enabled: bool,
|
|
}
|
|
|
|
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
|
pub struct SemanticIndexSettingsContent {
|
|
pub enabled: Option<bool>,
|
|
}
|
|
|
|
impl Setting for SemanticIndexSettings {
|
|
const KEY: Option<&'static str> = Some("semantic_index");
|
|
|
|
type FileContent = SemanticIndexSettingsContent;
|
|
|
|
fn load(
|
|
default_value: &Self::FileContent,
|
|
user_values: &[&Self::FileContent],
|
|
_: &gpui::AppContext,
|
|
) -> anyhow::Result<Self> {
|
|
Self::load_via_json_merge(default_value, user_values)
|
|
}
|
|
}
|