From 137ec6d5763a2aee91b2c917af0f3a559272faa4 Mon Sep 17 00:00:00 2001 From: Daniel <22460147+dwinkler1@users.noreply.github.com> Date: Sun, 26 Jul 2026 06:49:12 +0000 Subject: [PATCH] style: tidy visual clue groups + fix casing Two cosmetic cleanups from the post-fix consistency pass on 3f2ab6e: * lua/keymap/core.lua: changed the visual ``a`` entry to ``a`` on line 46 so the casing is consistent with every other key in ``Config.leader_group_clues``. mini.clue's trigger matching is case-insensitive, so this is purely cosmetic. * lua/keymap/leader.lua: added an ``xmap_leader('rr', ...)`` mapping that sends the visual selection through the filetype-aware dispatcher in ``lua/keymap/repl.lua``. Previously the visual ``r`` (+R) clue group was empty (no ``xmap_leader("r", ...)`` existed); visual users now have the same send-selection affordance that normal-mode users already get from the dispatcher. No normal-mode behavior changes. No regressions. The existing visual ``rx`` reprex mapping is preserved verbatim, just with a clarifying comment above it. Files: 2 modified. +9 / -1. --- lua/keymap/core.lua | 2 +- lua/keymap/leader.lua | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/keymap/core.lua b/lua/keymap/core.lua index 1314b06..8c0abe3 100644 --- a/lua/keymap/core.lua +++ b/lua/keymap/core.lua @@ -40,5 +40,5 @@ Config.leader_group_clues = { { mode = 'x', keys = 'r', desc = '+R' }, { mode = 'n', keys = 'z', desc = '+ZK' }, { mode = 'n', keys = 'zr', desc = '+Reviews' }, - { mode = 'x', keys = 'a', desc = '+AI' }, + { mode = 'x', keys = 'a', desc = '+AI' }, } diff --git a/lua/keymap/leader.lua b/lua/keymap/leader.lua index 2543212..795079f 100644 --- a/lua/keymap/leader.lua +++ b/lua/keymap/leader.lua @@ -163,6 +163,10 @@ nmap_leader('rm', 'RSend Rcpp::compileAttributes()', 'Run examples') nmap_leader('rT', 'RSend testthat::test_file("%")', 'Test file') nmap_leader('rt', 'RSend devtools::test()', 'Test') +-- Visual `r` bindings (dispatched by the filetype-aware REPL +-- runner in `lua/keymap/repl.lua`). Previously the visual clue group was +-- empty, so this restores parity between the visual and normal `r`-group. +xmap_leader('rr', function() require('keymap.repl').send_selection() end, 'Send selection to REPL') -- - Copy to clipboard and make reprex (which itself is loaded to clipboard) xmap_leader('rx', '"+y :RSend reprex::reprex()', 'Reprex selection')