Skip to content

Commit

Permalink
Update signature help on backspace/insert mode delete
Browse files Browse the repository at this point in the history
  • Loading branch information
sudormrfbin committed Mar 22, 2022
1 parent 57ef9b2 commit 87efd55
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -2837,6 +2841,8 @@ pub mod insert {
}
});
doc.apply(&transaction, view.id);

lsp::signature_help(cx);
}

pub fn delete_char_forward(cx: &mut Context) {
Expand All @@ -2853,6 +2859,8 @@ pub mod insert {
)
});
doc.apply(&transaction, view.id);

lsp::signature_help(cx);
}

pub fn delete_word_backward(cx: &mut Context) {
Expand All @@ -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) {
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 87efd55

Please sign in to comment.