Data types for declaration ranges #
The environment extension for declaration ranges is in Lean.DeclarationRange
.
Store position information for declarations.
- pos : Lean.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 : Lean.Position
- endCharUtf16 : Nat
See
charUtf16
.
Instances For
Equations
- Lean.instReprDeclarationRange = { reprPrec := Lean.reprDeclarationRange✝ }
Equations
- One or more equations did not get rendered due to their size.
- range : Lean.DeclarationRange
- selectionRange : Lean.DeclarationRange
Instances For
Equations
- Lean.instInhabitedDeclarationRanges = { default := { range := default, selectionRange := default } }
Equations
- Lean.instReprDeclarationRanges = { reprPrec := Lean.reprDeclarationRanges✝ }
Equations
- One or more equations did not get rendered due to their size.
A declaration location is a declaration range along with the name of the module the declaration resides in.
- module : Lean.Name
- range : Lean.DeclarationRange
Instances For
Equations
- Lean.instInhabitedDeclarationLocation = { default := { module := default, range := default } }
Equations
- Lean.instReprDeclarationLocation = { reprPrec := Lean.reprDeclarationLocation✝ }