- 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
.
Store position information for declarations.
Instances For
Equations
- Lean.instInhabitedDeclarationRange = { default := { pos := default, charUtf16 := default, endPos := default, endCharUtf16 := default } }
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.
Equations
- Lean.addBuiltinDeclarationRanges declName declRanges = ST.Ref.modify Lean.builtinDeclRanges fun x => Lean.NameMap.insert x declName declRanges
Instances For
def
Lean.addDeclarationRanges
{m : Type → Type}
[Lean.MonadEnv m]
(declName : Lake.Name)
(declRanges : Lean.DeclarationRanges)
:
m Unit
Equations
- Lean.addDeclarationRanges declName declRanges = Lean.modifyEnv fun env => Lean.MapDeclarationExtension.insert Lean.declRangeExt env declName declRanges
Instances For
def
Lean.findDeclarationRangesCore?
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
(declName : Lake.Name)
:
Equations
- Lean.findDeclarationRangesCore? declName = do let __do_lift ← Lean.getEnv pure (Lean.MapDeclarationExtension.find? Lean.declRangeExt __do_lift declName)
Instances For
def
Lean.findDeclarationRanges?
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
[MonadLiftT IO m]
(declName : Lake.Name)
:
Equations
- One or more equations did not get rendered due to their size.