feat: real range/bang/visual handling for the deferred command gaps
Implements the four items previously left as "needs handler work" — all
fully wired, not cosmetic.
- ToggleListItem / IncrementListItem / DecrementListItem are now -range
(both clients). The client loops the per-line op over [<line1>,<line2>]
(toggle_list_item_range / list_cycle_symbol_range). The server's edits are
version-less single-line WorkspaceEdits, so each line applies independently
— no server protocol change. `:'<,'>VimwikiToggleListItem` toggles the whole
selection.
- VimwikiRebuildTags gains -bang: `:…RebuildTags!` passes { all: true } and
the server (tags_rebuild) re-indexes every configured wiki via
wikis_snapshot(), not just the current one.
- VimwikiNormalizeLink is -nargs=?: with `1` (upstream's visual flag; the
x-mode `+` mapping now passes it) it wraps the '< / '> selection as
[[selection]] (new wrap_visual_as_wikilink in both clients).
- VimwikiCheckLinks is -range: a ranged invocation filters the broken-link
report to the current buffer's selected lines (client-side filter in
results_to_qf / check_links).
Tests: cmd.toggle_list_item_range + cmd.normalize_link_visual_wraps_selection
(test-keymaps.lua), normalize.visual_wraps_selection (test-keymaps-vim.vim).
README + doc/nuwiki.txt + gap doc updated. fmt/clippy clean; nvim 274,
vim 266+18, all Rust tests + config-parity green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -132,7 +132,10 @@ fix site.
|
||||
(align) vs `gww` (align w/o resize) distinction lost.
|
||||
- [ ] `VimwikiTable` is `-nargs=1` vs upstream `-nargs=*` (can't pass cols+rows).
|
||||
- [ ] `VimwikiListChangeLvl` is `-nargs=?` vs upstream `-range -nargs=+`.
|
||||
- [ ] `VimwikiRebuildTags` lacks `-bang` ("rebuild all" variant).
|
||||
- [x] `VimwikiRebuildTags` `-bang` ("rebuild all") — `:…RebuildTags!` now passes
|
||||
`{ all: true }`; the server (`tags_rebuild`) re-indexes **every** configured
|
||||
wiki (via `wikis_snapshot()`) instead of just the current one. `-bang` added to
|
||||
all four command defs.
|
||||
- [ ] `:VimwikiSearch` / `VWS` uses `lvimgrep`, not vimwiki's search engine.
|
||||
- [ ] `VimwikiIndex` family is buffer-local in nuwiki (upstream defines globally
|
||||
in `plugin/`); only `:…UISelect` is a global entry point.
|
||||
@@ -175,9 +178,12 @@ fix site.
|
||||
also switched both Neovim `Vimwiki/NuwikiTabIndex` from `vim.v.count` (always 0
|
||||
in command context) to `<count>`, so a `:NNuwikiTabIndex` count is now actually
|
||||
honored.
|
||||
- [ ] **`VimwikiToggleListItem` / `Increment` / `DecrementListItem` lack
|
||||
`-range`** (both branches) vs upstream's `-range` (`:350`) — no visual-range
|
||||
checkbox toggle / symbol cycle.
|
||||
- [x] **`VimwikiToggleListItem` / `Increment` / `DecrementListItem` `-range`** —
|
||||
all three (both branches) are now `-range`; the client loops the per-line op
|
||||
over `[<line1>, <line2>]` (`toggle_list_item_range` / `list_cycle_symbol_range`).
|
||||
The server edits are version-less single-line, so each line's edit applies
|
||||
independently — no server protocol change needed. Covered by
|
||||
`cmd.toggle_list_item_range` in `test-keymaps.lua`.
|
||||
- [ ] **Diary-note family lacks `-count`** _(new, 2026-05-31 re-audit)_ — upstream's
|
||||
`:Vimwiki{Make,TabMake,MakeYesterday,MakeTomorrow}DiaryNote` carry `-count=0`
|
||||
(the count selects the wiki number); nuwiki's diary-note commands declare no
|
||||
@@ -189,11 +195,14 @@ fix site.
|
||||
(colours), and the tag commands. nuwiki defines none, so `<Tab>` completion of
|
||||
page / tag / colour names at the `:` line is unavailable. _Fix:_
|
||||
`ftplugin/vimwiki.vim` (both branches) — VimL completers or LSP-backed.
|
||||
- [ ] **Minor command-attribute gaps** _(new)_ — `VimwikiNormalizeLink` lacks
|
||||
upstream's `-nargs=?`; `VimwikiCheckLinks` lacks `-range`. (`VimwikiColorize`
|
||||
`-nargs=1`→`-nargs=*` **done** — all four defs now match upstream, so a bare
|
||||
`:VimwikiColorize` prompts for the colour.) The remaining two would be
|
||||
accepted-but-ignored without handler work, so left open.
|
||||
- [x] **Minor command-attribute gaps** _(new)_ — all now real, not cosmetic:
|
||||
`VimwikiNormalizeLink` is `-nargs=?` and with `1` wraps the `'<`/`'>` selection
|
||||
(`wrap_visual_as_wikilink`, both clients; the `x`-mode `+` passes it too);
|
||||
`VimwikiCheckLinks` is `-range` and a ranged invocation filters the report to
|
||||
the current buffer's selected lines; `VimwikiColorize` `-nargs=1`→`-nargs=*`
|
||||
(bare `:VimwikiColorize` prompts). Covered by
|
||||
`normalize.visual_wraps_selection` (vim) /
|
||||
`cmd.normalize_link_visual_wraps_selection` (nvim).
|
||||
|
||||
### Config
|
||||
- [ ] `auto_header` — auto H1-from-filename on new page (server-side).
|
||||
|
||||
Reference in New Issue
Block a user