pub enum LspRequest {
Hover,
Definition,
Declaration,
TypeDefinition,
Implementation,
References,
FollowLink,
ReferencesView,
ReferencesViewRefresh,
ReferencesToErrorList,
}Expand description
L7 (lsp-architecture.md §16): which LSP navigation request a
mode-owned nav chord (K / gd / gD / gy / gI / gr / gx)
wants the host to fire. Pure data — no lsp_types, no lattice-lsp
dependency — so it can ride inside the host-owned Effect::Lsp
boundary. lsp-mode’s action_handlers() closure returns
Effect::Lsp(LspRequest::X); the host’s editor.lsp_request
dispatcher maps each arm onto the existing (unchanged) async request
substrate (lsp_hover_request / lsp_nav_request /
lsp_references_request / do_lsp_follow_link_at_cursor). The
handler carries no position — the substrate reads live Editor
cursor/scroll, so the popup/jump anchors to the symbol the chord
fired on.
Variants§
Hover
K – textDocument/hover.
Definition
gd – textDocument/definition.
Declaration
gD – textDocument/declaration.
TypeDefinition
gy – textDocument/typeDefinition.
Implementation
gI – textDocument/implementation.
References
gr – textDocument/references.
FollowLink
gx – follow the textDocument/documentLink covering the cursor.
ReferencesView
LR.2 (2026-08-11): :lsp-references – the same
textDocument/references query as Self::References, landing
at the editable multibuffer terminus instead of the picker.
A data arm rather than a new Effect variant, per §16’s grain:
a further LSP surface adds an arm here, not a host Action, not
a renderer classifier entry. The request, cancellation token,
anchor stash and wake are the unchanged substrate; only what the
drain does with the result differs.
ReferencesViewRefresh
LR.3 (2026-08-11): gr inside a references view — re-run the
query at the view’s stored origin and rebuild it in place.
Distinct from Self::ReferencesView because the position it
queries is different: this one must NOT read the live cursor.
By the time a refresh fires the cursor sits inside the
multibuffer, so querying there would ask about whatever symbol
happens to be under it — a different question with a
plausible-looking answer. The substrate reads the origin the
view recorded when it opened.
ReferencesToErrorList
EP.6 (2026-08-11): :lsp-references-to-error-list — the same
query, landing in the error list instead of a surface.
A third terminus rather than a cache snapshot: unlike diagnostics there is no standing “current references” state to pull from, so the command must run the query.
Trait Implementations§
Source§impl Clone for LspRequest
impl Clone for LspRequest
Source§fn clone(&self) -> LspRequest
fn clone(&self) -> LspRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LspRequest
Source§impl Debug for LspRequest
impl Debug for LspRequest
impl Eq for LspRequest
Source§impl PartialEq for LspRequest
impl PartialEq for LspRequest
impl StructuralPartialEq for LspRequest
Auto Trait Implementations§
impl Freeze for LspRequest
impl RefUnwindSafe for LspRequest
impl Send for LspRequest
impl Sync for LspRequest
impl Unpin for LspRequest
impl UnsafeUnpin for LspRequest
impl UnwindSafe for LspRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.