Include display text for LSP commands in errors (#23012)

https://github.com/zed-industries/zed/pull/23011 adds display of errors
in the UI so it's now more important to contextualize these.

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-01-11 14:59:06 -07:00 committed by GitHub
parent de2e197ad9
commit daaa250109
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 89 additions and 5 deletions

View file

@ -47,6 +47,10 @@ impl LspCommand for ExpandMacro {
type LspRequest = LspExpandMacro;
type ProtoRequest = proto::LspExtExpandMacro;
fn display_name(&self) -> &str {
"Expand macro"
}
fn to_lsp(
&self,
path: &Path,
@ -171,6 +175,10 @@ impl LspCommand for OpenDocs {
type LspRequest = LspOpenDocs;
type ProtoRequest = proto::LspExtOpenDocs;
fn display_name(&self) -> &str {
"Open docs"
}
fn to_lsp(
&self,
path: &Path,
@ -284,6 +292,10 @@ impl LspCommand for SwitchSourceHeader {
type LspRequest = LspSwitchSourceHeader;
type ProtoRequest = proto::LspExtSwitchSourceHeader;
fn display_name(&self) -> &str {
"Switch source header"
}
fn to_lsp(
&self,
path: &Path,