fix(keymaps): correct Neovim global diary tab/tomorrow maps (map_prefix audit)
CI / cargo fmt --check (push) Failing after 27s
CI / cargo clippy (push) Successful in 33s
CI / cargo test (push) Successful in 37s
CI / editor keymaps (push) Successful in 1m33s

A map_prefix parity audit against upstream vimwiki found the Neovim global
entry-point block in lua/nuwiki/init.lua carried the same collision the Vim
global + buffer-local maps were already fixed for: <prefix><Leader>t was
bound to tomorrow and <prefix><Leader>m (tomorrow) was missing entirely.

Now <prefix><Leader>t opens today in a new tab and <prefix><Leader>m is
tomorrow — consistent with plugin/nuwiki.vim, the buffer-local maps, and
upstream (VimwikiTabMakeDiaryNote / VimwikiMakeTomorrowDiaryNote).

Adds global_maps.diary_tab_and_tomorrow_targets to test-keymaps.lua (queries
in a scratch buffer so buffer-local maps don't shadow the globals). Logs the
fix plus a new "RSS feed structure fidelity" gap (the audit confirmed the
custom_wiki2html arg contract and base_url scope are faithful; only the RSS
document shape diverges) in development/vimwiki-gap.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 19:22:52 +00:00
parent feedd30c4d
commit 2a8e2b9ea9
3 changed files with 46 additions and 1 deletions
+2 -1
View File
@@ -57,7 +57,8 @@ local function _setup_global_mappings()
kmap('n', p .. 'i', function() _open(_diary_path(nil)) end, o('diary index'))
kmap('n', p .. '<Leader>w', function() _open(_diary_path(0)) end, o('today diary'))
kmap('n', p .. '<Leader>y', function() _open(_diary_path(-1)) end, o('yesterday diary'))
kmap('n', p .. '<Leader>t', function() _open(_diary_path(1)) end, o('tomorrow diary'))
kmap('n', p .. '<Leader>t', function() _open(_diary_path(0), 'tabedit') end, o('today diary (tab)'))
kmap('n', p .. '<Leader>m', function() _open(_diary_path(1)) end, o('tomorrow diary'))
kmap('n', p .. '<Leader>i', function() require('nuwiki.commands').diary_generate_index() end, o('rebuild diary index'))
end