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 → Lean.Lsp.RefIdent
Named identifier. These are used in all references that are globally available.
- fvar: 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 }
Converts the reference identifier to a string by prefixing it with a symbol.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Converts the string representation of a reference identifier back to a reference identifier.
The string representation must have been created by RefIdent.toString
.
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.
Equations
- Lean.Lsp.RefIdent.instToJsonRefIdent = { toJson := fun (ident : Lean.Lsp.RefIdent) => Lean.Json.str (Lean.Lsp.RefIdent.toString ident) }
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
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.
$/lean/ileanInfoUpdate
and $/lean/ileanInfoFinal
watchdog<-worker notifications.
Contains the file's definitions and references.
- version : Nat
Version of the file these references are from.
- references : Lean.Lsp.ModuleRefs
All references for the file.