File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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 =
Original file line number Diff line number Diff line change @@ -12,11 +12,16 @@ use tokio::time::Instant;
1212
1313use crate :: job;
1414
15+ // TODO: use to update code lenses positions on document changes
1516#[ derive( Default ) ]
17+ #[ allow( dead_code) ]
1618pub ( 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) ]
2025const DOCUMENT_CHANGE_DEBOUNCE : Duration = Duration :: from_millis ( 250 ) ;
2126
2227impl helix_event:: AsyncHook for DocumentCodeLensesHandler {
Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments