zed/crates/extension_api/wit/since_v0.0.6/settings.rs
Marshall Bowers c851e6edba
Add language_server_workspace_configuration to extension API (#10212)
This PR adds the ability for extensions to implement
`language_server_workspace_configuration` to provide workspace
configuration to the language server.

We've used the Dart extension as a motivating example for this, pulling
it out into an extension in the process.

Release Notes:

- Removed built-in support for Dart, in favor of making it available as
an extension. The Dart extension will be suggested for download when you
open a `.dart` file.

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-04-05 17:04:07 -04:00

21 lines
531 B
Rust

use serde::{Deserialize, Serialize};
use std::num::NonZeroU32;
#[derive(Debug, Serialize, Deserialize)]
pub struct LanguageSettings {
pub tab_size: NonZeroU32,
}
#[derive(Default, Debug, Serialize, Deserialize)]
pub struct LspSettings {
pub binary: Option<BinarySettings>,
pub initialization_options: Option<serde_json::Value>,
pub settings: Option<serde_json::Value>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct BinarySettings {
pub path: Option<String>,
pub arguments: Option<Vec<String>>,
}