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:
parent
de2e197ad9
commit
daaa250109
3 changed files with 89 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue