feat(client): wire full Vimwiki command-parity surface

Register the named :Vimwiki*/:Nuwiki* entry points that previously
existed only as mappings or were missing entirely — including
RemoveSingleCB/RemoveCBInList, CatUrl, TabMakeDiaryNote,
NormalizeLink, Renumber{List,AllLists}, TableAlign, ChangeSymbol(InList),
ListToggle, Increment/DecrementListItem, and the DeleteLink/RenameLink/
GenerateTags compat aliases. Both the Vim (vim-lsp/coc) and Neovim
client functions are added to back them.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 17:35:28 -03:00
parent 8d8d85daf9
commit 9bebd86577
3 changed files with 126 additions and 4 deletions
+62
View File
@@ -40,6 +40,7 @@ if !has('nvim')
command! -buffer VimwikiUISelect call nuwiki#commands#wiki_ui_select()
command! -buffer VimwikiDiaryIndex call nuwiki#commands#diary_index()
command! -buffer VimwikiMakeDiaryNote call nuwiki#commands#diary_today()
command! -buffer VimwikiTabMakeDiaryNote call nuwiki#commands#diary_today_tab()
command! -buffer VimwikiMakeYesterdayDiaryNote call nuwiki#commands#diary_yesterday()
command! -buffer VimwikiMakeTomorrowDiaryNote call nuwiki#commands#diary_tomorrow()
command! -buffer VimwikiDiaryNextDay call nuwiki#commands#diary_next()
@@ -56,12 +57,27 @@ if !has('nvim')
command! -buffer -nargs=1 VimwikiGoto call nuwiki#commands#wiki_goto_page(<q-args>)
command! -buffer VimwikiDeleteFile call nuwiki#commands#delete_file()
command! -buffer VimwikiDeleteLink call nuwiki#commands#delete_file()
command! -buffer VimwikiRenameFile call nuwiki#commands#rename_file()
command! -buffer VimwikiRenameLink call nuwiki#commands#rename_file()
command! -buffer VimwikiNextTask call nuwiki#commands#next_task()
command! -buffer VimwikiToggleListItem call nuwiki#commands#toggle_list_item()
command! -buffer VimwikiToggleRejectedListItem call nuwiki#commands#reject_list_item()
command! -buffer VimwikiListToggle call nuwiki#commands#list_toggle_or_add_checkbox()
command! -buffer VimwikiIncrementListItem call nuwiki#commands#list_cycle_symbol(1)
command! -buffer VimwikiDecrementListItem call nuwiki#commands#list_cycle_symbol(-1)
command! -buffer -nargs=1 VimwikiChangeSymbolTo call nuwiki#commands#list_change_symbol(<q-args>, 0)
command! -buffer -nargs=1 VimwikiListChangeSymbolI call nuwiki#commands#list_change_symbol(<q-args>, 0)
command! -buffer -nargs=1 VimwikiChangeSymbolInListTo call nuwiki#commands#list_change_symbol(<q-args>, 1)
command! -buffer VimwikiRemoveDone call nuwiki#commands#list_remove_done()
command! -buffer -range VimwikiRemoveSingleCB call nuwiki#commands#list_remove_checkbox()
command! -buffer VimwikiRemoveCBInList call nuwiki#commands#list_remove_checkbox_in_list()
command! -buffer -nargs=? VimwikiListChangeLvl call nuwiki#commands#list_change_lvl()
command! -buffer VimwikiNormalizeLink call nuwiki#commands#normalize_link()
command! -buffer VimwikiRenumberList call nuwiki#commands#list_renumber()
command! -buffer VimwikiRenumberAllLists call nuwiki#commands#list_renumber_all()
command! -buffer VimwikiTableAlignQ call nuwiki#commands#table_align()
command! -buffer VimwikiTableAlignW call nuwiki#commands#table_align()
command! -buffer Vimwiki2HTML call nuwiki#commands#export_current()
command! -buffer Vimwiki2HTMLBrowse call nuwiki#commands#export_browse()
@@ -76,6 +92,7 @@ if !has('nvim')
command! -buffer VimwikiRebuildTags call nuwiki#commands#tags_rebuild()
command! -buffer -nargs=? VimwikiSearchTags call nuwiki#commands#tags_search(<q-args>)
command! -buffer -nargs=? VimwikiGenerateTagLinks call nuwiki#commands#tags_generate_links(<q-args>)
command! -buffer -nargs=? VimwikiGenerateTags call nuwiki#commands#tags_generate_links(<q-args>)
" Tables, colorize, and clipboard paste.
command! -buffer -nargs=1 VimwikiTable call nuwiki#commands#table_insert()
@@ -84,6 +101,7 @@ if !has('nvim')
command! -buffer -nargs=1 VimwikiColorize call nuwiki#commands#colorize(<q-args>)
command! -buffer VimwikiPasteLink call nuwiki#commands#paste_link()
command! -buffer VimwikiPasteUrl call nuwiki#commands#paste_url()
command! -buffer VimwikiCatUrl call nuwiki#commands#cat_url()
" :Nuwiki* canonical aliases — Vim side.
command! -buffer -count NuwikiIndex call nuwiki#commands#wiki_index(<count>)
@@ -120,6 +138,7 @@ if !has('nvim')
command! -buffer NuwikiPrevLink call nuwiki#commands#link_prev()
command! -buffer NuwikiBaddLink call nuwiki#commands#badd_link()
command! -buffer NuwikiMakeDiaryNote call nuwiki#commands#diary_today()
command! -buffer NuwikiTabMakeDiaryNote call nuwiki#commands#diary_today_tab()
command! -buffer NuwikiMakeYesterdayDiaryNote call nuwiki#commands#diary_yesterday()
command! -buffer NuwikiMakeTomorrowDiaryNote call nuwiki#commands#diary_tomorrow()
command! -buffer NuwikiDiaryGenerateLinks call nuwiki#commands#diary_generate_index()
@@ -130,13 +149,25 @@ if !has('nvim')
command! -buffer -bang NuwikiAll2HTML if <bang>0 | call nuwiki#commands#export_all_force() | else | call nuwiki#commands#export_all() | endif
command! -buffer NuwikiRemoveDone call nuwiki#commands#list_remove_done()
command! -buffer -range NuwikiRemoveCheckbox call nuwiki#commands#list_remove_checkbox()
command! -buffer NuwikiRemoveCheckboxInList call nuwiki#commands#list_remove_checkbox_in_list()
command! -buffer -nargs=? NuwikiListChangeLvl call nuwiki#commands#list_change_lvl()
command! -buffer NuwikiListToggle call nuwiki#commands#list_toggle_or_add_checkbox()
command! -buffer NuwikiIncrementListItem call nuwiki#commands#list_cycle_symbol(1)
command! -buffer NuwikiDecrementListItem call nuwiki#commands#list_cycle_symbol(-1)
command! -buffer -nargs=1 NuwikiChangeSymbol call nuwiki#commands#list_change_symbol(<q-args>, 0)
command! -buffer -nargs=1 NuwikiChangeSymbolInList call nuwiki#commands#list_change_symbol(<q-args>, 1)
command! -buffer NuwikiNormalizeLink call nuwiki#commands#normalize_link()
command! -buffer NuwikiRenumberList call nuwiki#commands#list_renumber()
command! -buffer NuwikiRenumberAllLists call nuwiki#commands#list_renumber_all()
command! -buffer NuwikiTableAlign call nuwiki#commands#table_align()
command! -buffer -nargs=1 NuwikiTable call nuwiki#commands#table_insert()
command! -buffer NuwikiTableMoveColumnLeft call nuwiki#commands#table_move_left()
command! -buffer NuwikiTableMoveColumnRight call nuwiki#commands#table_move_right()
command! -buffer -nargs=1 NuwikiColorize call nuwiki#commands#colorize(<q-args>)
command! -buffer NuwikiPasteLink call nuwiki#commands#paste_link()
command! -buffer NuwikiPasteUrl call nuwiki#commands#paste_url()
command! -buffer NuwikiCatUrl call nuwiki#commands#cat_url()
" ===== Default key mappings (parity with upstream vimwiki) =====
"
@@ -295,6 +326,7 @@ command! -buffer -count VimwikiTabIndex lua require('nuwiki.commands').wiki_ta
command! -buffer VimwikiUISelect lua require('nuwiki.commands').wiki_ui_select()
command! -buffer VimwikiDiaryIndex lua require('nuwiki.commands').diary_index()
command! -buffer VimwikiMakeDiaryNote lua require('nuwiki.commands').diary_today()
command! -buffer VimwikiTabMakeDiaryNote lua require('nuwiki.commands').diary_today_tab()
command! -buffer VimwikiMakeYesterdayDiaryNote lua require('nuwiki.commands').diary_yesterday()
command! -buffer VimwikiMakeTomorrowDiaryNote lua require('nuwiki.commands').diary_tomorrow()
command! -buffer VimwikiDiaryNextDay lua require('nuwiki.commands').diary_next()
@@ -317,13 +349,28 @@ command! -buffer -nargs=1 VimwikiSearch lvimgrep /<args>/ **
command! -buffer -nargs=1 VWS lvimgrep /<args>/ **
command! -buffer VimwikiDeleteFile lua require('nuwiki.commands').delete_file()
command! -buffer VimwikiDeleteLink lua require('nuwiki.commands').delete_file()
command! -buffer VimwikiRenameFile lua require('nuwiki.commands').rename_file()
command! -buffer VimwikiRenameLink lua require('nuwiki.commands').rename_file()
command! -buffer VimwikiNextTask lua require('nuwiki.commands').next_task()
command! -buffer VimwikiToggleListItem lua require('nuwiki.commands').toggle_list_item()
command! -buffer VimwikiToggleRejectedListItem lua require('nuwiki.commands').reject_list_item()
command! -buffer VimwikiListToggle lua require('nuwiki.commands').list_toggle_or_add_checkbox()
command! -buffer VimwikiIncrementListItem lua require('nuwiki.commands').list_cycle_symbol(1)
command! -buffer VimwikiDecrementListItem lua require('nuwiki.commands').list_cycle_symbol(-1)
command! -buffer -nargs=1 VimwikiChangeSymbolTo lua require('nuwiki.commands').list_change_symbol(<q-args>, false)
command! -buffer -nargs=1 VimwikiListChangeSymbolI lua require('nuwiki.commands').list_change_symbol(<q-args>, false)
command! -buffer -nargs=1 VimwikiChangeSymbolInListTo lua require('nuwiki.commands').list_change_symbol(<q-args>, true)
command! -buffer VimwikiRemoveDone lua require('nuwiki.commands').list_remove_done()
command! -buffer -range VimwikiRemoveSingleCB lua require('nuwiki.commands').list_remove_checkbox()
command! -buffer VimwikiRemoveCBInList lua require('nuwiki.commands').list_remove_checkbox_in_list()
command! -buffer -nargs=? VimwikiListChangeLvl lua require('nuwiki.commands').list_change_lvl()
command! -buffer VimwikiNormalizeLink lua require('nuwiki.commands').normalize_link()
command! -buffer VimwikiRenumberList lua require('nuwiki.commands').list_renumber()
command! -buffer VimwikiRenumberAllLists lua require('nuwiki.commands').list_renumber_all()
command! -buffer VimwikiTableAlignQ lua require('nuwiki.commands').table_align()
command! -buffer VimwikiTableAlignW lua require('nuwiki.commands').table_align()
command! -buffer Vimwiki2HTML lua require('nuwiki.commands').export_current()
command! -buffer Vimwiki2HTMLBrowse lua require('nuwiki.commands').export_browse()
@@ -338,6 +385,7 @@ command! -buffer VimwikiFindOrphans lua require('nuwiki.commands').
command! -buffer VimwikiRebuildTags lua require('nuwiki.commands').tags_rebuild()
command! -buffer -nargs=? VimwikiSearchTags lua require('nuwiki.commands').tags_search(<q-args>)
command! -buffer -nargs=? VimwikiGenerateTagLinks lua require('nuwiki.commands').tags_generate_links(<q-args>)
command! -buffer -nargs=? VimwikiGenerateTags lua require('nuwiki.commands').tags_generate_links(<q-args>)
" Tables, colorize, and clipboard paste.
command! -buffer -nargs=1 VimwikiTable lua require('nuwiki.commands').table_insert()
@@ -346,6 +394,7 @@ command! -buffer VimwikiTableMoveColumnRight lua require('nuwiki.commands
command! -buffer -nargs=1 VimwikiColorize lua require('nuwiki.commands').colorize()
command! -buffer VimwikiPasteLink lua require('nuwiki.commands').paste_link()
command! -buffer VimwikiPasteUrl lua require('nuwiki.commands').paste_url()
command! -buffer VimwikiCatUrl lua require('nuwiki.commands').cat_url()
" Canonical :Nuwiki* aliases — P10.
command! -buffer -count NuwikiIndex lua require('nuwiki.commands').wiki_index(vim.v.count)
@@ -384,6 +433,7 @@ command! -buffer NuwikiNextLink lua require('nuwiki.command
command! -buffer NuwikiPrevLink lua require('nuwiki.commands').link_prev()
command! -buffer NuwikiBaddLink lua require('nuwiki.commands').badd_link()
command! -buffer NuwikiMakeDiaryNote lua require('nuwiki.commands').diary_today()
command! -buffer NuwikiTabMakeDiaryNote lua require('nuwiki.commands').diary_today_tab()
command! -buffer NuwikiMakeYesterdayDiaryNote lua require('nuwiki.commands').diary_yesterday()
command! -buffer NuwikiMakeTomorrowDiaryNote lua require('nuwiki.commands').diary_tomorrow()
command! -buffer NuwikiDiaryNextDay lua require('nuwiki.commands').diary_next()
@@ -398,13 +448,25 @@ command! -buffer NuwikiVSplitLink vsplit | lua vim.lsp.buf.definition()
command! -buffer NuwikiTabnewLink tabnew | lua vim.lsp.buf.definition()
command! -buffer NuwikiTabDropLink tabnew | lua vim.lsp.buf.definition()
command! -buffer NuwikiRemoveDone lua require('nuwiki.commands').list_remove_done()
command! -buffer -range NuwikiRemoveCheckbox lua require('nuwiki.commands').list_remove_checkbox()
command! -buffer NuwikiRemoveCheckboxInList lua require('nuwiki.commands').list_remove_checkbox_in_list()
command! -buffer -nargs=? NuwikiListChangeLvl lua require('nuwiki.commands').list_change_lvl()
command! -buffer NuwikiListToggle lua require('nuwiki.commands').list_toggle_or_add_checkbox()
command! -buffer NuwikiIncrementListItem lua require('nuwiki.commands').list_cycle_symbol(1)
command! -buffer NuwikiDecrementListItem lua require('nuwiki.commands').list_cycle_symbol(-1)
command! -buffer -nargs=1 NuwikiChangeSymbol lua require('nuwiki.commands').list_change_symbol(<q-args>, false)
command! -buffer -nargs=1 NuwikiChangeSymbolInList lua require('nuwiki.commands').list_change_symbol(<q-args>, true)
command! -buffer NuwikiNormalizeLink lua require('nuwiki.commands').normalize_link()
command! -buffer NuwikiRenumberList lua require('nuwiki.commands').list_renumber()
command! -buffer NuwikiRenumberAllLists lua require('nuwiki.commands').list_renumber_all()
command! -buffer NuwikiTableAlign lua require('nuwiki.commands').table_align()
command! -buffer -nargs=1 NuwikiTable lua require('nuwiki.commands').table_insert()
command! -buffer NuwikiTableMoveColumnLeft lua require('nuwiki.commands').table_move_column_left()
command! -buffer NuwikiTableMoveColumnRight lua require('nuwiki.commands').table_move_column_right()
command! -buffer -nargs=1 NuwikiColorize lua require('nuwiki.commands').colorize()
command! -buffer NuwikiPasteLink lua require('nuwiki.commands').paste_link()
command! -buffer NuwikiPasteUrl lua require('nuwiki.commands').paste_url()
command! -buffer NuwikiCatUrl lua require('nuwiki.commands').cat_url()
" Buffer attach: keymaps + text objects + folding.
lua require('nuwiki.ftplugin').attach(0)