zed/crates/extension_api/wit/since_v0.1.0/settings.rs
Marshall Bowers 98a2ab0686
zed_extension_api: Bump to v0.1.0 (#16158)
This PR changes v0.0.7 of the extension API to v0.1.0.

We had a false-start in releasing v0.0.7, which has since been yanked,
so we need a new version number. We'll publish v0.1.0 to crates.io once
the Preview build is out tomorrow.

We're incrementing the minor version so that we have some leeway in
putting out patch releases of the crate within a given extension API
release.

Release Notes:

- N/A
2024-08-13 10:04:34 -04:00

29 lines
965 B
Rust

use serde::{Deserialize, Serialize};
use std::num::NonZeroU32;
/// The settings for a particular language.
#[derive(Debug, Serialize, Deserialize)]
pub struct LanguageSettings {
/// How many columns a tab should occupy.
pub tab_size: NonZeroU32,
}
/// The settings for a particular language server.
#[derive(Default, Debug, Serialize, Deserialize)]
pub struct LspSettings {
/// The settings for the language server binary.
pub binary: Option<BinarySettings>,
/// The initialization options to pass to the language server.
pub initialization_options: Option<serde_json::Value>,
/// The settings to pass to language server.
pub settings: Option<serde_json::Value>,
}
/// The settings for a language server binary.
#[derive(Debug, Serialize, Deserialize)]
pub struct BinarySettings {
/// The path to the binary.
pub path: Option<String>,
/// The arguments to pass to the binary.
pub arguments: Option<Vec<String>>,
}