lsp: fix root detection to use instance directory instead of worktree

This commit is contained in:
Dax Raad
2025-10-09 04:30:30 -04:00
parent c0bd29155d
commit 979c9ea569

View File

@@ -25,11 +25,11 @@ export namespace LSPServer {
const files = Filesystem.up({
targets: patterns,
start: path.dirname(file),
stop: Instance.worktree,
stop: Instance.directory,
})
const first = await files.next()
await files.return()
if (!first.value) return Instance.worktree
if (!first.value) return Instance.directory
return path.dirname(first.value)
}
}