This file contains types for communication between the watchdog and the workers. These messages are not visible externally to users of the LSP server.
Most reference-related types have custom FromJson/ToJson implementations to reduce the size of the resulting JSON.
Identifier of a reference.
- const: Lake.Name → Lake.Name → Lean.Lsp.RefIdent
Named identifier. These are used in all references that are globally available.
- fvar: Lake.Name → Lean.FVarId → Lean.Lsp.RefIdent
Unnamed identifier. These are used for all local references.
Instances For
Equations
- Lean.Lsp.instBEqRefIdent = { beq := Lean.Lsp.beqRefIdent✝ }
Equations
- Lean.Lsp.instHashableRefIdent = { hash := Lean.Lsp.hashRefIdent✝ }
Equations
- Lean.Lsp.instInhabitedRefIdent = { default := Lean.Lsp.RefIdent.const default default }
Equations
- Lean.Lsp.RefIdent.instToJsonFVarId = { toJson := fun (id : Lean.FVarId) => Lean.toJson id.name }
Equations
- Lean.Lsp.RefIdent.instFromJsonFVarId = { fromJson? := fun (s : Lean.Json) => do let __do_lift ← Lean.fromJson? s pure { name := __do_lift } }
Shortened representation of RefIdent
for more compact serialization.
- c: Lake.Name → Lake.Name → Lean.Lsp.RefIdent.RefIdentJsonRepr
Shortened representation of
RefIdent.const
for more compact serialization. - f: Lake.Name → Lean.FVarId → Lean.Lsp.RefIdent.RefIdentJsonRepr
Shortened representation of
RefIdent.fvar
for more compact serialization.
Instances For
Converts id
to its compact serialization representation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Converts RefIdent
from a JSON for RefIdentJsonRepr
.
Equations
- Lean.Lsp.RefIdent.fromJson? s = do let __do_lift ← Lean.fromJson? s pure (Lean.Lsp.RefIdent.fromJsonRepr __do_lift)
Instances For
Converts RefIdent
to a JSON for RefIdentJsonRepr
.
Equations
- id.toJson = Lean.toJson id.toJsonRepr
Instances For
Equations
- Lean.Lsp.RefIdent.instFromJson = { fromJson? := Lean.Lsp.RefIdent.fromJson? }
Equations
- Lean.Lsp.RefIdent.instToJson = { toJson := Lean.Lsp.RefIdent.toJson }
Information about the declaration surrounding a reference.
- name : Lake.Name
Name of the declaration surrounding a reference.
- range : Lean.Lsp.Range
Range of the declaration surrounding a reference.
- selectionRange : Lean.Lsp.Range
Selection range of the declaration surrounding a reference.
Instances For
Denotes the range of a reference, as well as the parent declaration of the reference. If the reference is itself a declaration, then it contains no parent declaration.
- range : Lean.Lsp.Range
Range of the reference.
- parentDecl? : Option Lean.Lsp.RefInfo.ParentDecl
Parent declaration of the reference.
none
if the reference is itself a declaration.
Instances For
Equations
- Lean.Lsp.RefInfo.instInhabitedLocation = { default := { range := default, parentDecl? := default } }
Definition site and usage sites of a reference. Obtained from Lean.Server.RefInfo
.
- definition? : Option Lean.Lsp.RefInfo.Location
Definition site of the reference. May be
none
when we cannot find a definition site. - usages : Array Lean.Lsp.RefInfo.Location
Usage sites of the reference.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
References from a single module/file
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Used in the $/lean/ileanInfoUpdate
and $/lean/ileanInfoFinal
watchdog <- worker notifications.
Contains the definitions and references of the file managed by a worker.
- version : Nat
Version of the file these references are from.
- references : Lean.Lsp.ModuleRefs
All references for the file.
Instances For
Used in the $/lean/importClosure
watchdog <- worker notification.
Contains the full import closure of the file managed by a worker.
- importClosure : Array Lean.Lsp.DocumentUri
Full import closure of the file.
Instances For
Used in the $/lean/importClosure
watchdog -> worker notification.
Informs the worker that one of its dependencies has gone stale and likely needs to be rebuilt.
- staleDependency : Lean.Lsp.DocumentUri
The dependency that is stale.