Settings refactor (#38367)
Co-Authored-By: Ben K <ben@zed.dev> Co-Authored-By: Anthony <anthony@zed.dev> Co-Authored-By: Mikayla <mikayla@zed.dev> Release Notes: - settings: Major internal changes to settings. The primary user-facing effect is that some settings which did not make sense in project settings files are no-longer read from there. (For example the inline blame settings) --------- Co-authored-by: Ben Kunkle <ben@zed.dev> Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
co-authored by
Ben Kunkle
Mikayla Maki
Anthony
parent
0a9023bce0
commit
fcdab160f9
@@ -30,10 +30,9 @@ use gpui::{
|
||||
|
||||
use lsp::{LanguageServerId, NumberOrString};
|
||||
use parking_lot::Mutex;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use settings::{SettingsUi, WorktreeId};
|
||||
use settings::WorktreeId;
|
||||
use smallvec::SmallVec;
|
||||
use smol::future::yield_now;
|
||||
use std::{
|
||||
@@ -174,10 +173,7 @@ pub enum IndentKind {
|
||||
}
|
||||
|
||||
/// The shape of a selection cursor.
|
||||
#[derive(
|
||||
Copy, Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq, JsonSchema, SettingsUi,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub enum CursorShape {
|
||||
/// A vertical bar
|
||||
#[default]
|
||||
@@ -190,6 +186,17 @@ pub enum CursorShape {
|
||||
Hollow,
|
||||
}
|
||||
|
||||
impl From<settings::CursorShape> for CursorShape {
|
||||
fn from(shape: settings::CursorShape) -> Self {
|
||||
match shape {
|
||||
settings::CursorShape::Bar => CursorShape::Bar,
|
||||
settings::CursorShape::Block => CursorShape::Block,
|
||||
settings::CursorShape::Underline => CursorShape::Underline,
|
||||
settings::CursorShape::Hollow => CursorShape::Hollow,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
struct SelectionSet {
|
||||
line_mode: bool,
|
||||
|
||||
Reference in New Issue
Block a user