Add missing :Nuwiki* aliases and drop dead deferred-stub code

Every :Vimwiki* command now has a canonical :Nuwiki* counterpart
(tables, colorize, clipboard paste, list-level/remove-done, and the
Neovim-only split/tab link-follow variants). Remove the now-unused
"not yet implemented" stub helpers (_not_yet, deferred,
s:notify_deferred) and the stale "deferred" comments, since every
command is implemented and server-backed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 15:54:05 -03:00
parent 8ab6015405
commit cd9d587aab
4 changed files with 29 additions and 43 deletions
+28 -6
View File
@@ -2,9 +2,8 @@
"
" Wires up:
" - basic edit-time options (commentstring, suffixesadd, …)
" - every `:Vimwiki*` / `:Nuwiki*` command that has a
" server-side counterpart (deferred commands stub out with a
" "not yet implemented" notification)
" - every `:Vimwiki*` / `:Nuwiki*` command, dispatching to the
" server (or a pure client-side helper for the few that need one)
" - on Neovim: keymaps + text objects + folding via
" `nuwiki.ftplugin.attach()`
@@ -78,7 +77,7 @@ if !has('nvim')
command! -buffer -nargs=? VimwikiSearchTags call nuwiki#commands#tags_search(<q-args>)
command! -buffer -nargs=? VimwikiGenerateTagLinks call nuwiki#commands#tags_generate_links(<q-args>)
" Deferred stubs.
" Tables, colorize, and clipboard paste.
command! -buffer -nargs=1 VimwikiTable call nuwiki#commands#table_insert()
command! -buffer VimwikiTableMoveColumnLeft call nuwiki#commands#table_move_left()
command! -buffer VimwikiTableMoveColumnRight call nuwiki#commands#table_move_right()
@@ -86,7 +85,7 @@ if !has('nvim')
command! -buffer VimwikiPasteLink call nuwiki#commands#paste_link()
command! -buffer VimwikiPasteUrl call nuwiki#commands#paste_url()
" :Nuwiki* canonical aliases (P10) — Vim side.
" :Nuwiki* canonical aliases — Vim side.
command! -buffer -count NuwikiIndex call nuwiki#commands#wiki_index(<count>)
command! -buffer -count NuwikiTabIndex call nuwiki#commands#wiki_tab_index(<count>)
command! -buffer NuwikiDiaryIndex call nuwiki#commands#diary_index()
@@ -130,6 +129,15 @@ if !has('nvim')
command! -buffer Nuwiki2HTMLBrowse call nuwiki#commands#export_browse()
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 -nargs=? NuwikiListChangeLvl call nuwiki#commands#list_change_lvl()
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()
" ===== Default key mappings (parity with upstream vimwiki) =====
"
" Users can opt out by setting `g:nuwiki_no_default_mappings = 1`
@@ -331,7 +339,7 @@ command! -buffer VimwikiRebuildTags lua require('nuwiki.commands').
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>)
" Deferred — stubs notify the user instead of erroring.
" Tables, colorize, and clipboard paste.
command! -buffer -nargs=1 VimwikiTable lua require('nuwiki.commands').table_insert()
command! -buffer VimwikiTableMoveColumnLeft lua require('nuwiki.commands').table_move_column_left()
command! -buffer VimwikiTableMoveColumnRight lua require('nuwiki.commands').table_move_column_right()
@@ -384,5 +392,19 @@ command! -buffer Nuwiki2HTML lua require('nuwiki.command
command! -buffer Nuwiki2HTMLBrowse lua require('nuwiki.commands').export_browse()
command! -buffer -bang NuwikiAll2HTML execute (<bang>0 ? "lua require('nuwiki.commands').export_all_force()" : "lua require('nuwiki.commands').export_all()")
command! -buffer NuwikiGoBackLink execute "normal! \<C-o>"
command! -buffer NuwikiSplitLink split | lua vim.lsp.buf.definition()
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 -nargs=? NuwikiListChangeLvl lua require('nuwiki.commands').list_change_lvl()
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()
" Buffer attach: keymaps + text objects + folding.
lua require('nuwiki.ftplugin').attach(0)