diff --git a/development/tests/test-keymaps.lua b/development/tests/test-keymaps.lua index 1d3cb00..10a7766 100644 --- a/development/tests/test-keymaps.lua +++ b/development/tests/test-keymaps.lua @@ -850,6 +850,33 @@ vim.defer_fn(function() if not ok then error(err) end end) + -- ===== Global (non-buffer) entry-point diary maps ===== + -- init.lua _setup_global_mappings ran during setup(). Regression guard for + -- the audit-found bug: t must be today-in-a-tab and + -- m must be tomorrow (matching the Vim global side + + -- upstream), not the old wiring that dropped `m` and bound `t` to tomorrow. + -- Query in a scratch (non-vimwiki) buffer so the buffer-local maps don't + -- shadow the globals. + tobj_case('global_maps.diary_tab_and_tomorrow_targets', function() + local buf = vim.api.nvim_create_buf(false, true) + vim.api.nvim_set_current_buf(buf) + local function gdesc(lhs) + local d = vim.fn.maparg(lhs, 'n', false, true) + if vim.tbl_isempty(d) then return nil end + return d.desc or '' + end + local ok, err = pcall(function() + local t = gdesc('wt') + local m = gdesc('wm') + if not t then error('wt global map missing') end + if not m then error('wm global map missing (tomorrow)') end + if not t:find('tab') then error('wt should be today-in-tab, desc=' .. t) end + if not m:find('tomorrow') then error('wm should be tomorrow, desc=' .. m) end + end) + vim.api.nvim_buf_delete(buf, { force = true }) + if not ok then error(err) end + end) + -- ===== Wiki picker (config-driven, no LSP) ===== -- The picker must build its list from config so it works from any buffer -- before the server attaches. diff --git a/development/vimwiki-gap.md b/development/vimwiki-gap.md index 709489a..a6594f7 100644 --- a/development/vimwiki-gap.md +++ b/development/vimwiki-gap.md @@ -267,6 +267,16 @@ fix site. - [ ] `commentstring` (`'%%%s'`) — comment toggling/text-objects. - [ ] `color_tag_template` — `color_dic` present; template regex missing. - [ ] `rss_max_items` / `rss_name` — `:Rss` output hardcoded. _Fix:_ `HtmlConfig`. +- [ ] **RSS feed structure fidelity** _(new, 2026-05-31 base_url audit)_ — + nuwiki's `write_rss` is intentionally minimal (title/link/guid). Upstream + emits more: channel `` points at the diary index page + (`base_url + diary_rel_path + diary_index + .html`, nuwiki uses bare + `base_url`); per-item `` holds the bare date + basename (nuwiki uses the full URL, no attribute); plus ``, channel/item `` (from mtime), and a `` + rendered-HTML body per item. `base_url`'s *scope* is faithful (RSS-only, + not inter-page links) and the `custom_wiki2html` arg contract is an exact + match — only the feed document shape diverges. - [ ] `emoji_enable` — emoji substitution. - [ ] `html_header_numbering` (+`_sym`) — numbered HTML headers. - [ ] `valid_html_tags` — allowed inline HTML tags in export. @@ -289,6 +299,13 @@ fix site. `plugin/nuwiki.vim`'s global family now binds `wm` (tomorrow) and `wt` opens today in a new tab (was the same collision the buffer-local maps had). Covered by `map[n].wm` in both harnesses. +- [x] **`wm` missing from the Neovim *global* map block** + _(new, 2026-05-31 map_prefix audit)_ — the same collision survived in + `lua/nuwiki/init.lua`'s `_setup_global_mappings`: `t` was + bound to tomorrow and `m` (tomorrow) was absent entirely. + Fixed so `t` opens today in a new tab and `m` + is tomorrow — now consistent with the Vim global side + upstream. Covered by + `global_maps.diary_tab_and_tomorrow_targets` (`test-keymaps.lua`). --- diff --git a/lua/nuwiki/init.lua b/lua/nuwiki/init.lua index a4aee2f..717f62e 100644 --- a/lua/nuwiki/init.lua +++ b/lua/nuwiki/init.lua @@ -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 .. 'w', function() _open(_diary_path(0)) end, o('today diary')) kmap('n', p .. 'y', function() _open(_diary_path(-1)) end, o('yesterday diary')) - kmap('n', p .. 't', function() _open(_diary_path(1)) end, o('tomorrow diary')) + kmap('n', p .. 't', function() _open(_diary_path(0), 'tabedit') end, o('today diary (tab)')) + kmap('n', p .. 'm', function() _open(_diary_path(1)) end, o('tomorrow diary')) kmap('n', p .. 'i', function() require('nuwiki.commands').diary_generate_index() end, o('rebuild diary index')) end