first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -3,7 +3,8 @@ use std::fmt::{Display, Formatter};
|
||||
use enum_iterator::{all, Sequence};
|
||||
use galaxyui::ModelContext;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{macros::define_settings_group, Setting as _, SupportedPlatforms, SyncToCloud};
|
||||
use settings::macros::define_settings_group;
|
||||
use settings::{RespectUserSyncSetting, Setting as _, SupportedPlatforms, SyncToCloud};
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
@@ -77,6 +78,38 @@ impl Display for CursorDisplayType {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Default,
|
||||
Eq,
|
||||
PartialEq,
|
||||
Deserialize,
|
||||
Serialize,
|
||||
Sequence,
|
||||
schemars::JsonSchema,
|
||||
settings_value::SettingsValue,
|
||||
)]
|
||||
#[schemars(
|
||||
description = "How line numbers are displayed in code editors.",
|
||||
rename_all = "snake_case"
|
||||
)]
|
||||
pub enum CodeEditorLineNumberMode {
|
||||
#[default]
|
||||
Absolute,
|
||||
Relative,
|
||||
}
|
||||
|
||||
impl CodeEditorLineNumberMode {
|
||||
pub fn dropdown_item_label(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Absolute => "Absolute",
|
||||
Self::Relative => "Relative",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Default, Debug, Serialize, Deserialize, PartialEq)]
|
||||
pub enum TabBehavior {
|
||||
#[default]
|
||||
@@ -193,6 +226,15 @@ define_settings_group!(AppEditorSettings, settings: [
|
||||
toml_path: "text_editing.vim_status_bar",
|
||||
description: "Whether the Vim status bar is displayed.",
|
||||
},
|
||||
code_editor_line_number_mode: CodeEditorLineNumberModeSetting {
|
||||
type: CodeEditorLineNumberMode,
|
||||
default: CodeEditorLineNumberMode::default(),
|
||||
supported_platforms: SupportedPlatforms::ALL,
|
||||
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
|
||||
private: false,
|
||||
toml_path: "text_editing.code_editor_line_number_mode",
|
||||
description: "How line numbers are displayed in code editors.",
|
||||
},
|
||||
autocomplete_symbols: AutocompleteSymbols {
|
||||
type: bool,
|
||||
default: true,
|
||||
|
||||
Reference in New Issue
Block a user