Shorten setting name

This commit is contained in:
Joseph T. Lyons 2023-08-23 04:07:10 -04:00
parent 711f156308
commit 7b170304df
3 changed files with 6 additions and 7 deletions

View File

@ -348,7 +348,7 @@
// - Only works with Posix-complaint shells
// - Only activates the first virtual environment it finds, regardless
// of the nunber of projects in the workspace.
"automatically_activate_python_virtual_environment": false
"activate_python_virtual_environment": false
},
// Difference settings for semantic_index
"semantic_index": {

View File

@ -23,9 +23,8 @@ impl Project {
));
} else {
let settings = settings::get::<TerminalSettings>(cx);
let automatically_activate_python_virtual_environment = settings
.automatically_activate_python_virtual_environment
.clone();
let activate_python_virtual_environment =
settings.activate_python_virtual_environment.clone();
let shell = settings.shell.clone();
let terminal = TerminalBuilder::new(
@ -54,7 +53,7 @@ impl Project {
})
.detach();
if automatically_activate_python_virtual_environment {
if activate_python_virtual_environment {
let activate_script_path = self.find_activate_script_path(&shell, cx);
self.activate_python_virtual_environment(
activate_script_path,

View File

@ -158,7 +158,7 @@ pub struct TerminalSettings {
pub dock: TerminalDockPosition,
pub default_width: f32,
pub default_height: f32,
pub automatically_activate_python_virtual_environment: bool,
pub activate_python_virtual_environment: bool,
}
#[derive(Clone, Debug, Default, Serialize, Deserialize, JsonSchema)]
@ -177,7 +177,7 @@ pub struct TerminalSettingsContent {
pub dock: Option<TerminalDockPosition>,
pub default_width: Option<f32>,
pub default_height: Option<f32>,
pub automatically_activate_python_virtual_environment: Option<bool>,
pub activate_python_virtual_environment: Option<bool>,
}
impl TerminalSettings {