This commit is contained in:
Dax Raad
2025-08-30 15:23:42 -04:00
parent 11afe56f63
commit 46af0aca8e
+3 -3
View File
@@ -515,8 +515,8 @@ export namespace LSPServer {
export const RustAnalyzer: Info = { export const RustAnalyzer: Info = {
id: "rust", id: "rust",
root: async (file, app) => { root: async (root) => {
const crateRoot = await NearestRoot(["Cargo.toml", "Cargo.lock"])(file, app) const crateRoot = await NearestRoot(["Cargo.toml", "Cargo.lock"])(root)
if (crateRoot === undefined) { if (crateRoot === undefined) {
return undefined return undefined
} }
@@ -539,7 +539,7 @@ export namespace LSPServer {
currentDir = parentDir currentDir = parentDir
// Stop if we've gone above the app root // Stop if we've gone above the app root
if (!currentDir.startsWith(app.path.root)) break if (!currentDir.startsWith(Instance.worktree)) break
} }
return crateRoot return crateRoot