Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

fix(tools): find global .NET tools such as fsautocomplete (#497)

arookieofc00108a669ebd
diff --git a/crates/ide-core/src/tool_path.rs b/crates/ide-core/src/tool_path.rs
index 6abe16a4f..14760d56c 100644
--- a/crates/ide-core/src/tool_path.rs
+++ b/crates/ide-core/src/tool_path.rs
@@ -80,6 +80,8 @@ const USER_DIRS: &[&str] = &[
".cargo/bin",
".local/bin",
"go/bin",
+ // `dotnet tool install --global` puts fsautocomplete, csharp-ls and friends here.
+ ".dotnet/tools",
".bun/bin",
".deno/bin",
".npm-global/bin",
@@ -170,6 +172,8 @@ mod tests {
let at = |d: &str| dirs.iter().position(|p| p == Path::new(d)).unwrap();
assert_eq!(dirs[..3], [PathBuf::from("/usr/bin"), "/opt/tools".into(), "/home/me/.asdf/shims".into()]);
assert!(at("/home/me/.npm-global/bin") < at("/home/me/.pyenv/shims"));
+ // Global .NET tools (fsautocomplete, csharp-ls) install here, off PATH.
+ assert!(at("/home/me/.dotnet/tools") < at("/usr/local/bin"));
assert!(at("/home/me/.local/share/mise/shims") < at("/usr/local/bin"));
assert!(dirs.iter().all(|d| d.is_absolute()));
let unique: HashSet<&PathBuf> = dirs.iter().collect();