Skip to content

Commit 0096f95

Browse files
committed
chore: cleanup
1 parent 26149d1 commit 0096f95

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

helix-term/src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ impl MappableCommand {
433433
add_newline_below, "Add newline below",
434434
goto_type_definition, "Goto type definition",
435435
goto_implementation, "Goto implementation",
436-
request_code_lenses, "Request code lenses",
436+
show_code_lenses_under_cursor, "Show code lenses under cursor",
437437
goto_file_start, "Goto line number <n> else file start",
438438
goto_file_end, "Goto file end",
439439
extend_to_file_start, "Extend to line number<n> else file start",

helix-term/src/commands/lsp.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,9 +1467,7 @@ impl ui::menu::Item for lsp::CodeLens {
14671467
}
14681468
}
14691469

1470-
// TODO: should be run the same way as diagnostic - shouldn't require manual
1471-
// trigger to set lenses.
1472-
pub fn request_code_lenses(cx: &mut Context) {
1470+
pub fn show_code_lenses_under_cursor(cx: &mut Context) {
14731471
let (_view, doc) = current!(cx.editor);
14741472
let doc_id = doc.id();
14751473
let language_server =

helix-term/src/handlers/code_lenses.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ use tokio::time::Instant;
1212

1313
use crate::job;
1414

15+
// TODO: use to update code lenses positions on document changes
1516
#[derive(Default)]
17+
#[allow(dead_code)]
1618
pub(super) struct DocumentCodeLensesHandler {
1719
docs: HashSet<DocumentId>,
1820
}
1921

22+
// TODO: use to update debounce document changes when udpating positions of code lenses
23+
// TODO: share with color swatches and possibly other annotations
24+
#[allow(dead_code)]
2025
const DOCUMENT_CHANGE_DEBOUNCE: Duration = Duration::from_millis(250);
2126

2227
impl helix_event::AsyncHook for DocumentCodeLensesHandler {

helix-term/src/keymap/default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
236236
"g" => changed_file_picker,
237237
"a" => code_action,
238238
"'" => last_picker,
239-
"L" => request_code_lenses,
239+
"l" => show_code_lenses_under_cursor,
240240
"G" => { "Debug (experimental)" sticky=true
241241
"l" => dap_launch,
242242
"r" => dap_restart,

0 commit comments

Comments
 (0)