parent
044508ef77
commit
d912b0dd36
5 changed files with 0 additions and 37 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -13797,10 +13797,8 @@ dependencies = [
|
||||||
"menu",
|
"menu",
|
||||||
"picker",
|
"picker",
|
||||||
"project",
|
"project",
|
||||||
"schemars",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"settings",
|
|
||||||
"task",
|
"task",
|
||||||
"tree-sitter-rust",
|
"tree-sitter-rust",
|
||||||
"tree-sitter-typescript",
|
"tree-sitter-typescript",
|
||||||
|
|
|
@ -1475,11 +1475,6 @@
|
||||||
"dev": {
|
"dev": {
|
||||||
// "theme": "Andromeda"
|
// "theme": "Andromeda"
|
||||||
},
|
},
|
||||||
// Task-related settings.
|
|
||||||
"task": {
|
|
||||||
// Whether to show task status indicator in the status bar. Default: true
|
|
||||||
"show_status_indicator": true
|
|
||||||
},
|
|
||||||
// Whether to show full labels in line indicator or short ones
|
// Whether to show full labels in line indicator or short ones
|
||||||
//
|
//
|
||||||
// Values:
|
// Values:
|
||||||
|
|
|
@ -23,9 +23,7 @@ menu.workspace = true
|
||||||
picker.workspace = true
|
picker.workspace = true
|
||||||
project.workspace = true
|
project.workspace = true
|
||||||
task.workspace = true
|
task.workspace = true
|
||||||
schemars.workspace = true
|
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
settings.workspace = true
|
|
||||||
ui.workspace = true
|
ui.workspace = true
|
||||||
util.workspace = true
|
util.workspace = true
|
||||||
workspace.workspace = true
|
workspace.workspace = true
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
use schemars::JsonSchema;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use settings::{Settings, SettingsSources};
|
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, PartialEq, Default)]
|
|
||||||
pub(crate) struct TaskSettings {
|
|
||||||
pub(crate) show_status_indicator: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Task-related settings.
|
|
||||||
#[derive(Serialize, Deserialize, PartialEq, Default, Clone, JsonSchema)]
|
|
||||||
pub(crate) struct TaskSettingsContent {
|
|
||||||
/// Whether to show task status indicator in the status bar. Default: true
|
|
||||||
show_status_indicator: Option<bool>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Settings for TaskSettings {
|
|
||||||
const KEY: Option<&'static str> = Some("task");
|
|
||||||
|
|
||||||
type FileContent = TaskSettingsContent;
|
|
||||||
|
|
||||||
fn load(sources: SettingsSources<Self::FileContent>, _: &mut gpui::App) -> gpui::Result<Self> {
|
|
||||||
sources.json_merge()
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use ::settings::Settings;
|
|
||||||
use editor::Editor;
|
use editor::Editor;
|
||||||
use feature_flags::{Debugger, FeatureFlagViewExt};
|
use feature_flags::{Debugger, FeatureFlagViewExt};
|
||||||
use gpui::{App, AppContext as _, Context, Entity, Task, Window};
|
use gpui::{App, AppContext as _, Context, Entity, Task, Window};
|
||||||
|
@ -12,12 +11,10 @@ use workspace::tasks::schedule_task;
|
||||||
use workspace::{tasks::schedule_resolved_task, Start, Workspace};
|
use workspace::{tasks::schedule_resolved_task, Start, Workspace};
|
||||||
|
|
||||||
mod modal;
|
mod modal;
|
||||||
mod settings;
|
|
||||||
|
|
||||||
pub use modal::{Rerun, Spawn};
|
pub use modal::{Rerun, Spawn};
|
||||||
|
|
||||||
pub fn init(cx: &mut App) {
|
pub fn init(cx: &mut App) {
|
||||||
settings::TaskSettings::register(cx);
|
|
||||||
cx.observe_new(
|
cx.observe_new(
|
||||||
|workspace: &mut Workspace, window: Option<&mut Window>, cx: &mut Context<Workspace>| {
|
|workspace: &mut Workspace, window: Option<&mut Window>, cx: &mut Context<Workspace>| {
|
||||||
workspace
|
workspace
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue