mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-07 18:04:54 +01:00
lsp: fix root detection to use instance directory instead of worktree
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user