Major clean up and improvements to vimwiki compatibility and documentation.
CI / cargo fmt --check (push) Successful in 33s
CI / cargo clippy (push) Successful in 23s
CI / cargo test (push) Successful in 33s
CI / editor keymaps (push) Successful in 1m25s

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-05-30 18:35:40 +00:00
parent 95645a2b91
commit 8ab6015405
71 changed files with 2496 additions and 1914 deletions
+38 -9
View File
@@ -1,9 +1,9 @@
" ftplugin/nuwiki.vim — per-buffer settings + Phase 19 command/keymap glue.
" ftplugin/nuwiki.vim — per-buffer settings + command/keymap glue.
"
" Wires up:
" - basic edit-time options (commentstring, suffixesadd, …)
" - every `:Vimwiki*` / `:Nuwiki*` command from SPEC §12.10 that has a
" server-side counterpart (deferred §13.1 commands stub out with a
" - every `:Vimwiki*` / `:Nuwiki*` command that has a
" server-side counterpart (deferred commands stub out with a
" "not yet implemented" notification)
" - on Neovim: keymaps + text objects + folding via
" `nuwiki.ftplugin.attach()`
@@ -78,7 +78,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>)
" §13.1 deferred stubs.
" Deferred stubs.
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()
@@ -115,6 +115,21 @@ if !has('nvim')
command! -buffer -nargs=? NuwikiGenerateTagLinks call nuwiki#commands#tags_generate_links(<q-args>)
command! -buffer -nargs=1 NuwikiGoto call nuwiki#commands#wiki_goto_page(<q-args>)
" Canonical :Nuwiki* names that mirror the documented surface.
" The older :Nuwiki* spellings above stay defined for back-compat.
command! -buffer NuwikiNextLink call nuwiki#commands#link_next()
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 NuwikiMakeYesterdayDiaryNote call nuwiki#commands#diary_yesterday()
command! -buffer NuwikiMakeTomorrowDiaryNote call nuwiki#commands#diary_tomorrow()
command! -buffer NuwikiDiaryGenerateLinks call nuwiki#commands#diary_generate_index()
command! -buffer NuwikiDiaryNextDay call nuwiki#commands#diary_next()
command! -buffer NuwikiDiaryPrevDay call nuwiki#commands#diary_prev()
command! -buffer Nuwiki2HTML call nuwiki#commands#export_current()
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
" ===== Default key mappings (parity with upstream vimwiki) =====
"
" Users can opt out by setting `g:nuwiki_no_default_mappings = 1`
@@ -162,8 +177,8 @@ if !has('nvim')
nnoremap <silent><buffer> gnt :call nuwiki#commands#next_task()<CR>
nnoremap <silent><buffer> gln :call nuwiki#commands#cycle_list_item()<CR>
xnoremap <silent><buffer> gln :<C-u>call nuwiki#commands#cycle_list_item()<CR>
nnoremap <silent><buffer> glp :call nuwiki#commands#cycle_list_item()<CR>
xnoremap <silent><buffer> glp :<C-u>call nuwiki#commands#cycle_list_item()<CR>
nnoremap <silent><buffer> glp :call nuwiki#commands#cycle_list_item_back()<CR>
xnoremap <silent><buffer> glp :<C-u>call nuwiki#commands#cycle_list_item_back()<CR>
nnoremap <silent><buffer> glx :call nuwiki#commands#reject_list_item()<CR>
xnoremap <silent><buffer> glx :<C-u>call nuwiki#commands#reject_list_item()<CR>
nnoremap <silent><buffer> glh :call nuwiki#commands#list_change_level(-1, 0)<CR>
@@ -173,7 +188,7 @@ if !has('nvim')
nnoremap <silent><buffer> glr :call nuwiki#commands#list_renumber()<CR>
nnoremap <silent><buffer> gLr :call nuwiki#commands#list_renumber_all()<CR>
nnoremap <silent><buffer> gl<Space> :call nuwiki#commands#list_remove_done()<CR>
nnoremap <silent><buffer> gL<Space> :call nuwiki#commands#list_remove_done()<CR>
nnoremap <silent><buffer> gL<Space> :call nuwiki#commands#list_remove_done_all()<CR>
nnoremap <silent><buffer> o :call nuwiki#commands#open_below_with_bullet()<CR>
nnoremap <silent><buffer> O :call nuwiki#commands#open_above_with_bullet()<CR>
@@ -316,7 +331,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>)
" §13.1 deferred — stubs notify the user instead of erroring.
" Deferred — stubs notify the user instead of erroring.
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()
@@ -355,5 +370,19 @@ command! -buffer -nargs=? NuwikiSearchTags lua require('nuwiki.commands'
command! -buffer -nargs=? NuwikiGenerateTagLinks lua require('nuwiki.commands').tags_generate_links(<q-args>)
command! -buffer -nargs=1 NuwikiGoto lua require('nuwiki.commands').wiki_goto_page(<q-args>)
" Phase 19 buffer attach: keymaps + text objects + folding.
" Canonical :Nuwiki* names that mirror the documented surface.
" The older :Nuwiki* spellings above stay defined for back-compat.
command! -buffer NuwikiNextLink lua require('nuwiki.commands').link_next()
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 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()
command! -buffer NuwikiDiaryPrevDay lua require('nuwiki.commands').diary_prev()
command! -buffer Nuwiki2HTML lua require('nuwiki.commands').export_current()
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()")
" Buffer attach: keymaps + text objects + folding.
lua require('nuwiki.ftplugin').attach(0)