mirror of
https://github.com/dwinkler1/nvimConfig.git
synced 2026-08-22 17:43:13 -04:00
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 ``<leader>a`` entry to
``<Leader>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
``<Leader>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 ``<leader>rx`` reprex mapping is preserved verbatim, just
with a clarifying comment above it.
Files: 2 modified. +9 / -1.
This commit is contained in:
parent
3f2ab6ef96
commit
137ec6d576
2 changed files with 5 additions and 1 deletions
|
|
@ -40,5 +40,5 @@ Config.leader_group_clues = {
|
|||
{ mode = 'x', keys = '<Leader>r', desc = '+R' },
|
||||
{ mode = 'n', keys = '<Leader>z', desc = '+ZK' },
|
||||
{ mode = 'n', keys = '<Leader>zr', desc = '+Reviews' },
|
||||
{ mode = 'x', keys = '<leader>a', desc = '+AI' },
|
||||
{ mode = 'x', keys = '<Leader>a', desc = '+AI' },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,6 +163,10 @@ nmap_leader('rm', '<Cmd>RSend Rcpp::compileAttributes()<CR>', 'Run examples')
|
|||
nmap_leader('rT', '<Cmd>RSend testthat::test_file("%")<CR>', 'Test file')
|
||||
nmap_leader('rt', '<Cmd>RSend devtools::test()<CR>', 'Test')
|
||||
|
||||
-- Visual `<leader>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()<CR>', 'Reprex selection')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue