From 87efd5523efd1877d31cd8569f80540862bf7f5b Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Tue, 22 Mar 2022 22:01:37 +0530 Subject: [PATCH] Update signature help on backspace/insert mode delete --- helix-term/src/commands.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 8f58ed6bf7769..8fedfbcf7d66b 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -702,6 +702,8 @@ fn kill_to_line_start(cx: &mut Context) { range.put_cursor(text, text.line_to_char(line), true) }); delete_selection_insert_mode(doc, view, &selection); + + lsp::signature_help(cx); } fn kill_to_line_end(cx: &mut Context) { @@ -721,6 +723,8 @@ fn kill_to_line_end(cx: &mut Context) { new_range }); delete_selection_insert_mode(doc, view, &selection); + + lsp::signature_help(cx); } fn goto_first_nonwhitespace(cx: &mut Context) { @@ -2637,7 +2641,7 @@ pub mod insert { // lsp doesn't tell us when to close the signature help, so we request // the help information again after common close triggers which should // return None, which in turn closes the popup. - let close_triggers = &[')', ';']; + let close_triggers = &[')', ';', '.']; if is_trigger || close_triggers.contains(&ch) { super::signature_help(cx); @@ -2837,6 +2841,8 @@ pub mod insert { } }); doc.apply(&transaction, view.id); + + lsp::signature_help(cx); } pub fn delete_char_forward(cx: &mut Context) { @@ -2853,6 +2859,8 @@ pub mod insert { ) }); doc.apply(&transaction, view.id); + + lsp::signature_help(cx); } pub fn delete_word_backward(cx: &mut Context) { @@ -2865,6 +2873,8 @@ pub mod insert { .clone() .transform(|range| movement::move_prev_word_start(text, range, count)); delete_selection_insert_mode(doc, view, &selection); + + lsp::signature_help(cx); } pub fn delete_word_forward(cx: &mut Context) { @@ -2877,6 +2887,8 @@ pub mod insert { .clone() .transform(|range| movement::move_next_word_start(text, range, count)); delete_selection_insert_mode(doc, view, &selection); + + lsp::signature_help(cx); } }