Data types for declaration ranges #
The environment extension for declaration ranges is in Lean.DeclarationRange
.
Store position information for declarations.
- pos : Position
- charUtf16 : Nat
A precomputed UTF-16
character
field as inLean.Lsp.Position
. We need to store this because LSP clients want us to report the range in terms of UTF-16, but converting a Unicode codepoint stored inLean.Position
to UTF-16 requires loading and mapping the target source file, which is IO-heavy. - endPos : Position
- endCharUtf16 : Nat
See
charUtf16
.
Instances For
- range : DeclarationRange
- selectionRange : DeclarationRange
Instances For
A declaration location is a declaration range along with the name of the module the declaration resides in.
- module : Name
- range : DeclarationRange