From 28383ea401df0dc257c75f69c639899a80a9ee2c Mon Sep 17 00:00:00 2001 From: RatCornu Date: Tue, 14 Jan 2025 23:58:11 +0100 Subject: [PATCH] Optionally load init.scm and helix.scm from env var --- helix-term/src/commands/engine/steel.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helix-term/src/commands/engine/steel.rs b/helix-term/src/commands/engine/steel.rs index b47a043a6..bd40b1b33 100644 --- a/helix-term/src/commands/engine/steel.rs +++ b/helix-term/src/commands/engine/steel.rs @@ -1416,7 +1416,9 @@ fn local_config_exists() -> bool { } fn preferred_config_path(file_name: &str) -> PathBuf { - if local_config_exists() { + if let Ok(steel_config_dir) = std::env::var("HELIX_STEEL_CONFIG") { + PathBuf::from(steel_config_dir).join(file_name) + } else if local_config_exists() { find_workspace().0.join(".helix").join(file_name) } else { helix_loader::config_dir().join(file_name)