fix: resolve symlinks for the LSP client
This commit is contained in:
parent
bce56fdc0c
commit
67aa823ae2
1 changed files with 3 additions and 1 deletions
|
|
@ -250,7 +250,9 @@ def referingTo (self : References) (ident : RefIdent) (srcSearchPath : SearchPat
|
|||
for (module, refs) in self.allRefs.toList do
|
||||
if let some info := refs.find? ident then
|
||||
if let some path ← srcSearchPath.findWithExt "lean" module then
|
||||
let uri := DocumentUri.ofPath path
|
||||
-- Resolve symlinks (such as `src` in the build dir) so that files are
|
||||
-- opened in the right folder
|
||||
let uri := DocumentUri.ofPath <| ← IO.FS.realPath path
|
||||
if includeDefinition then
|
||||
if let some range := info.definition then
|
||||
result := result.push ⟨uri, range⟩
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue