From 896bf47d8dc1916265fa342b4209d1e406839853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Daron?= Date: Sat, 21 Sep 2024 19:22:50 +0200 Subject: [PATCH] adding support for jujutsu VCS inside find_workspace resolution (#11685) --- helix-loader/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helix-loader/src/lib.rs b/helix-loader/src/lib.rs index f36c76c4f..0e7c134d0 100644 --- a/helix-loader/src/lib.rs +++ b/helix-loader/src/lib.rs @@ -225,7 +225,7 @@ pub fn merge_toml_values(left: toml::Value, right: toml::Value, merge_depth: usi /// Used as a ceiling dir for LSP root resolution, the filepicker and potentially as a future filewatching root /// /// This function starts searching the FS upward from the CWD -/// and returns the first directory that contains either `.git`, `.svn` or `.helix`. +/// and returns the first directory that contains either `.git`, `.svn`, `.jj` or `.helix`. /// If no workspace was found returns (CWD, true). /// Otherwise (workspace, false) is returned pub fn find_workspace() -> (PathBuf, bool) { @@ -233,6 +233,7 @@ pub fn find_workspace() -> (PathBuf, bool) { for ancestor in current_dir.ancestors() { if ancestor.join(".git").exists() || ancestor.join(".svn").exists() + || ancestor.join(".jj").exists() || ancestor.join(".helix").exists() { return (ancestor.to_owned(), false);