fix(env): Use documentUriFromModule
This commit is contained in:
parent
b2b7cc388a
commit
a8b7f69632
|
@ -131,9 +131,8 @@ def inspect (args: Protocol.EnvInspect) (options: @&Protocol.Options): Protocol.
|
||||||
} }
|
} }
|
||||||
| _ => pure core
|
| _ => pure core
|
||||||
let result ← if args.source?.getD false then
|
let result ← if args.source?.getD false then
|
||||||
let srcSearchPath ← getSrcSearchPath
|
|
||||||
try
|
try
|
||||||
let sourceUri? ← module?.mapM (findLean srcSearchPath ·)
|
let sourceUri? ← module?.bindM (Server.documentUriFromModule? ·)
|
||||||
let declRange? ← findDeclarationRanges? name
|
let declRange? ← findDeclarationRanges? name
|
||||||
let sourceStart? := declRange?.map (·.range.pos)
|
let sourceStart? := declRange?.map (·.range.pos)
|
||||||
let sourceEnd? := declRange?.map (·.range.endPos)
|
let sourceEnd? := declRange?.map (·.range.endPos)
|
||||||
|
@ -143,7 +142,7 @@ def inspect (args: Protocol.EnvInspect) (options: @&Protocol.Options): Protocol.
|
||||||
sourceStart?,
|
sourceStart?,
|
||||||
sourceEnd?,
|
sourceEnd?,
|
||||||
}
|
}
|
||||||
catch _ =>
|
catch _e =>
|
||||||
.pure result
|
.pure result
|
||||||
else
|
else
|
||||||
.pure result
|
.pure result
|
||||||
|
|
Loading…
Reference in New Issue