aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands/lsp.rs
diff options
context:
space:
mode:
authorMatthias Deiml2022-11-09 09:17:09 +0000
committerGitHub2022-11-09 09:17:09 +0000
commitdee5b2a983f6a334753be48730868e8dd651b505 (patch)
tree3fe0e73147ccef4e4fc5703686646da6bf7dfb0e /helix-term/src/commands/lsp.rs
parent3e84434c695379dd2b56415c5cec46990488d007 (diff)
Add LSP workspace command picker (#3140)
* Add workspace command picker * Make command typable * Add optional argument to lsp-workspace-command
Diffstat (limited to 'helix-term/src/commands/lsp.rs')
-rw-r--r--helix-term/src/commands/lsp.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 5498fc83..c149e62b 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -603,6 +603,14 @@ pub fn code_action(cx: &mut Context) {
},
)
}
+
+impl ui::menu::Item for lsp::Command {
+ type Data = ();
+ fn label(&self, _data: &Self::Data) -> Spans {
+ self.title.as_str().into()
+ }
+}
+
pub fn execute_lsp_command(editor: &mut Editor, cmd: lsp::Command) {
let doc = doc!(editor);
let language_server = language_server!(editor, doc);