mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-20 01:12:15 +00:00
lsp: fix root detection to use instance directory instead of worktree
This commit is contained in:
parent
c0bd29155d
commit
979c9ea569
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue