parity(2): insert-mode list bindings (<C-D>/<C-T>/<C-L><C-?>)
Match upstream vimwiki's insert-mode list editing: <C-D> list_change_level(-1) dedent current item <C-T> list_change_level(+1) indent current item <C-L><C-J> list_cycle_symbol(+1) cycle marker forward <C-L><C-K> list_cycle_symbol(-1) cycle marker backward <C-L><C-M> list_toggle_or_add_chk toggle if has checkbox, else add `[ ]` Cycle order matches vimwiki's canonical run: - → * → # → 1. → 1) → a) → A) → i) → I) → (wrap) Both Lua and VimL paths wired. Lua callbacks fire directly (no `<C-o>` dance) since list_change_level / changeSymbol mutate the buffer via the LSP applyEdit pipeline, which works cleanly in insert mode. VimL keeps the `<C-o>:call …<CR>` idiom since that's the standard there. Harness adds 5 cases covering the new insert-mode bindings plus one direct LSP roundtrip for changeSymbol — surfaced a long-standing stale-binary footgun in test-keymaps.sh (rebuilt only when bin was missing; now rebuilds every run since incremental cargo is fast). Harness also captures server log_messages and dumps them on failure so future swallowed-error bugs (Err → log + Ok(None)) are visible. Gates: 421 Rust / 25 Neovim / 12 Vim. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -169,6 +169,13 @@ if !has('nvim')
|
||||
nnoremap <silent><buffer> o :call nuwiki#commands#open_below_with_bullet()<CR>
|
||||
nnoremap <silent><buffer> O :call nuwiki#commands#open_above_with_bullet()<CR>
|
||||
|
||||
" Insert-mode list editing (vimwiki parity).
|
||||
inoremap <silent><buffer> <C-D> <C-o>:call nuwiki#commands#list_change_level(-1, 0)<CR>
|
||||
inoremap <silent><buffer> <C-T> <C-o>:call nuwiki#commands#list_change_level(1, 0)<CR>
|
||||
inoremap <silent><buffer> <C-L><C-J> <C-o>:call nuwiki#commands#list_cycle_symbol(1)<CR>
|
||||
inoremap <silent><buffer> <C-L><C-K> <C-o>:call nuwiki#commands#list_cycle_symbol(-1)<CR>
|
||||
inoremap <silent><buffer> <C-L><C-M> <C-o>:call nuwiki#commands#list_toggle_or_add_checkbox()<CR>
|
||||
|
||||
" Headers
|
||||
nnoremap <silent><buffer> = :call nuwiki#commands#heading_add()<CR>
|
||||
nnoremap <silent><buffer> - :call nuwiki#commands#heading_remove()<CR>
|
||||
|
||||
Reference in New Issue
Block a user