Improve extension API documentation (#10322)

This PR adds some more documentation to symbols exported from the
`zed_extension_api` crate.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-04-09 10:38:29 -04:00 committed by GitHub
parent 414058379b
commit 132b8aa5c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 26 additions and 1 deletions

View file

@ -1,20 +1,29 @@
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>>,
}