feat(client): add gl/gL one-key list change-symbol mappings

Upstream's one-key marker-change keys had no nuwiki binding — the
functionality was reachable only via :NuwikiChangeSymbol. Add normal-mode
gl{-,*,#,1,i,I,a,A} (current item) and gL{...} (whole list) to both
clients, wired to the existing list_change_symbol command. NumericParen
1) stays command-only, matching upstream's default number_types shadowing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 08:10:05 -03:00
parent 214707e327
commit 061785c6a0
2 changed files with 30 additions and 0 deletions
+12
View File
@@ -219,6 +219,18 @@ function M.attach(bufnr, mappings)
{ desc = 'nuwiki: renumber list' }, bufnr)
map('n', 'gLr', cmd.list_renumber_all,
{ desc = 'nuwiki: renumber all lists' }, bufnr)
-- gl<sym>/gL<sym>: set the current item's / whole list's marker (upstream
-- VimwikiChangeSymbolTo / ChangeSymbolInListTo). 1) is command-only.
for _, pair in ipairs({
{ '-', '-' }, { '*', '*' }, { '#', '#' }, { '1', '1.' },
{ 'i', 'i)' }, { 'I', 'I)' }, { 'a', 'a)' }, { 'A', 'A)' },
}) do
local key, sym = pair[1], pair[2]
map('n', 'gl' .. key, function() cmd.list_change_symbol(sym, false) end,
{ desc = 'nuwiki: set item marker to ' .. sym }, bufnr)
map('n', 'gL' .. key, function() cmd.list_change_symbol(sym, true) end,
{ desc = 'nuwiki: set list markers to ' .. sym }, bufnr)
end
map('n', 'gl<Space>', cmd.list_remove_done,
{ desc = 'nuwiki: remove done items (current list)' }, bufnr)
map('n', 'gL<Space>', cmd.list_remove_done_all,