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.
Information about a single import statement.
- module : String
Name of the module that is imported.
- isPrivate : Bool
Whether the module is being imported via
private import
. - isAll : Bool
Whether the module is being imported via
import all
. - isMeta : Bool
Whether the module is being imported via
meta import
.
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.
Equations
Equations
Equations
Equations
- Lean.Lsp.instOrdRefIdent = { compare := Lean.Lsp.ordRefIdent✝ }
Shortened representation of RefIdent
for more compact serialization.
- c
(m n : String)
: RefIdentJsonRepr
Shortened representation of
RefIdent.const
for more compact serialization. - f
(m i : String)
: RefIdentJsonRepr
Shortened representation of
RefIdent.fvar
for more compact serialization.
Instances For
Equations
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 }
Equations
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 : Range
Range of the reference.
- parentDecl? : Option ParentDecl
Parent declaration of the reference.
none
if the reference is itself a declaration.
Instances For
Definition site and usage sites of a reference. Obtained from Lean.Server.RefInfo
.
Definition site of the reference. May be
none
when we cannot find a definition site.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.
Equations
- One or more equations did not get rendered due to their size.
Used in the $/lean/ileanHeaderInfo
watchdog <- worker notifications.
Contains the direct imports of the file managed by a worker.
- version : Nat
Version of the file these imports are from.
- directImports : Array ImportInfo
Direct imports of this file.
Instances For
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 : 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 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 : DocumentUri
The dependency that is stale.
Instances For
LSP type for Lean.OpenDecl
.
- allExcept
(«namespace» : Name)
(exceptions : Array Name)
: OpenNamespace
All declarations in
«namespace»
are opened, except forexceptions
. - renamed
(«from» to : Name)
: OpenNamespace
The declaration
«from»
is renamed toto
.
Instances For
Equations
- Lean.Lsp.instFromJsonOpenNamespace = { fromJson? := Lean.Lsp.fromJsonOpenNamespace✝ }
Equations
Query in the $/lean/queryModule
watchdog <- worker request.
- identifier : String
Identifier (potentially partial) to query.
- openNamespaces : Array OpenNamespace
Namespaces that are open at the position of
identifier
. Used for accurately matching declarations againstidentifier
in context.
Instances For
Equations
Equations
Used in the $/lean/queryModule
watchdog <- worker request, which is used by the worker to
extract information from the .ilean information in the watchdog.
- sourceRequestID : JsonRpc.RequestID
The request ID in the context of which this worker -> watchdog request was emitted. Used for cancelling this request in the watchdog.
- queries : Array LeanModuleQuery
Module queries for extracting .ilean information in the watchdog.
Instances For
Equations
Equations
Result for a single module query. Identifiers in the response are sorted descendingly by how well they match the query.
Instances For
Response for the $/lean/queryModule
watchdog <- worker request.
- queryResults : Array LeanQueriedModule
Results for each query in
LeanQueryModuleParams
. Positions correspond toqueries
in the parameter of the request.
Instances For
Name of a declaration in a given module.
Instances For
Equations
- Lean.Lsp.instFromJsonLeanDeclIdent = { fromJson? := Lean.Lsp.fromJsonLeanDeclIdent✝ }
Equations
LocationLink
with additional meta-data that allows the watchdog to resolve the range of this
LocationLink
. This is necessary because the position information from the .olean may be stale
(e.g. if the user has edited the file that the definition is from, but neither saved or built it),
while file workers sync their current reference information into the watchdog using ilean info
notifications, which is up-to-date.
- ident? : Option LeanDeclIdent
Identifier that caused this location link.
- isDefault : Bool
Whether this location link was generated by a fallback handler. If the file worker can't produce any non-fallback location links, the watchdog tries again using its reference information from the ileans and ilean updates.