Files
nuwiki/ftplugin/vimwiki.vim
T
gffranco 9d34c8baa2 feat(13.1-A): list rewriters — removeDone, renumber, changeSymbol/Level
Closes the four-command list-rewriter cluster from SPEC §13.1.

Server-side (commands.rs ops module):
- `parse_symbol` / `render_marker` — round-trip between
  `:VimwikiListChangeSymbol` arg shapes (`-`, `1.`, `a)`, `i)`,
  `Dash`, `Numeric`, …) and the rendered marker text. `render_marker`
  knows how to spell `a/b/…/z/aa` and `i/ii/iv/v/…/MMM` for the
  alphabetic + roman variants.
- `remove_done_edit` — walks every list (recursively through
  blockquotes and sublists), emits delete TextEdits for items whose
  checkbox is `Done` or `Rejected`. Item span gets extended through
  the trailing newline so we don't leave behind empty lines. Accepts
  an optional `position` to scope the operation to the item under
  cursor + its descendants.
- `renumber_edit` — finds the list containing the cursor line (or
  every list when `whole_file: true`), re-sequences numeric
  markers in-place. Unordered lists are left alone.
- `change_symbol_edit` — rewrites the leading marker on a single
  item, or every item in a list when `whole_list: true`. Uses
  `render_marker` so ordered variants get the right index.
- `change_level_edit` — re-indents the marker line (or every line of
  the item subtree when `whole_subtree: true`) by ±2 spaces per
  level. Dedent clamps at column 0.
- `find_list_at_line` + `find_marker_span` — pure helpers reused by
  the three above.

Editor glue:
- `lua/nuwiki/commands.lua` / `autoload/nuwiki/commands.vim` —
  removed all four "not yet implemented" stubs and wired them to the
  real LSP commands. Lua also exposes `list_change_lvl(direction)`
  for the `:VimwikiListChangeLvl decrease|increase` compat entry.
- Keymaps for `glh` / `gll` / `gLh` / `gLl` (list level single +
  subtree), `glr` / `gLr` (renumber list + whole-file),
  `gl<Space>` / `gL<Space>` (remove done items) now hit the real
  commands instead of printing a "deferred" notification.

Tests: 16 new in `cluster_a_list_rewriters.rs` covering
symbol parsing, marker rendering (alpha + roman + numeric),
removeDone shape, scoped removeDone, no-match cases, renumber
sequencing, whole-file walk, changeSymbol single + whole-list,
changeLevel single + subtree + clamp, and COMMANDS list completeness.
Total 402 Rust tests pass; clippy clean; keymap harness still at
20/20.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 14:37:11 +00:00

289 lines
20 KiB
VimL

" ftplugin/nuwiki.vim — per-buffer settings + Phase 19 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
" "not yet implemented" notification)
" - on Neovim: keymaps + text objects + folding via
" `nuwiki.ftplugin.attach()`
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal commentstring=%%\ %s
setlocal comments=:%%
setlocal formatoptions+=ron
setlocal suffixesadd=.wiki
setlocal iskeyword+=-
let b:undo_ftplugin = 'setlocal commentstring< comments< formatoptions< suffixesadd< iskeyword<'
if !has('nvim')
" ===== Plain Vim path =====
"
" Define the same `:Vimwiki*` / `:Nuwiki*` surface here, dispatching
" through `autoload/nuwiki/commands.vim` (which talks to vim-lsp).
" coc.nvim users can run `:CocCommand nuwiki.x` directly and skip
" these aliases.
command! -buffer -count VimwikiIndex call nuwiki#commands#wiki_index(<count>)
command! -buffer -count VimwikiTabIndex call nuwiki#commands#wiki_tab_index(<count>)
command! -buffer VimwikiDiaryIndex call nuwiki#commands#diary_index()
command! -buffer VimwikiMakeDiaryNote call nuwiki#commands#diary_today()
command! -buffer VimwikiMakeYesterdayDiaryNote call nuwiki#commands#diary_yesterday()
command! -buffer VimwikiMakeTomorrowDiaryNote call nuwiki#commands#diary_tomorrow()
command! -buffer VimwikiDiaryNextDay call nuwiki#commands#diary_next()
command! -buffer VimwikiDiaryPrevDay call nuwiki#commands#diary_prev()
command! -buffer VimwikiDiaryGenerateLinks call nuwiki#commands#diary_generate_index()
command! -buffer VimwikiFollowLink LspDefinition
command! -buffer VimwikiBacklinks LspReferences
command! -buffer VWB LspReferences
command! -buffer -nargs=1 VimwikiSearch lvimgrep /<args>/ **
command! -buffer -nargs=1 VWS lvimgrep /<args>/ **
command! -buffer -nargs=1 VimwikiGoto call nuwiki#commands#wiki_goto_page(<q-args>)
command! -buffer VimwikiDeleteFile call nuwiki#commands#delete_file()
command! -buffer VimwikiRenameFile 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 VimwikiRemoveDone call nuwiki#commands#list_remove_done()
command! -buffer -nargs=? VimwikiListChangeLvl call nuwiki#commands#list_change_lvl()
command! -buffer Vimwiki2HTML call nuwiki#commands#export_current()
command! -buffer Vimwiki2HTMLBrowse call nuwiki#commands#export_browse()
command! -buffer -bang VimwikiAll2HTML if <bang>0 | call nuwiki#commands#export_all_force() | else | call nuwiki#commands#export_all() | endif
command! -buffer VimwikiRss call nuwiki#commands#export_rss()
command! -buffer VimwikiTOC call nuwiki#commands#toc_generate()
command! -buffer VimwikiGenerateLinks call nuwiki#commands#links_generate()
command! -buffer VimwikiCheckLinks call nuwiki#commands#check_links()
command! -buffer VimwikiFindOrphans call nuwiki#commands#find_orphans()
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>)
" §13.1 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()
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()
" :Nuwiki* canonical aliases (P10) — Vim side.
command! -buffer -count NuwikiIndex call nuwiki#commands#wiki_index(<count>)
command! -buffer NuwikiTabIndex call nuwiki#commands#wiki_tab_index(<count>)
command! -buffer NuwikiDiaryIndex call nuwiki#commands#diary_index()
command! -buffer NuwikiDiaryToday call nuwiki#commands#diary_today()
command! -buffer NuwikiDiaryYesterday call nuwiki#commands#diary_yesterday()
command! -buffer NuwikiDiaryTomorrow call nuwiki#commands#diary_tomorrow()
command! -buffer NuwikiDiaryNext call nuwiki#commands#diary_next()
command! -buffer NuwikiDiaryPrev call nuwiki#commands#diary_prev()
command! -buffer NuwikiFollowLink LspDefinition
command! -buffer NuwikiBacklinks LspReferences
command! -buffer NuwikiDeleteFile call nuwiki#commands#delete_file()
command! -buffer NuwikiRenameFile call nuwiki#commands#rename_file()
command! -buffer NuwikiNextTask call nuwiki#commands#next_task()
command! -buffer NuwikiToggleListItem call nuwiki#commands#toggle_list_item()
command! -buffer NuwikiToggleRejected call nuwiki#commands#reject_list_item()
command! -buffer NuwikiExport call nuwiki#commands#export_current()
command! -buffer NuwikiExportBrowse call nuwiki#commands#export_browse()
command! -buffer -bang NuwikiExportAll if <bang>0 | call nuwiki#commands#export_all_force() | else | call nuwiki#commands#export_all() | endif
command! -buffer NuwikiRss call nuwiki#commands#export_rss()
command! -buffer NuwikiTOC call nuwiki#commands#toc_generate()
command! -buffer NuwikiGenerateLinks call nuwiki#commands#links_generate()
command! -buffer NuwikiCheckLinks call nuwiki#commands#check_links()
command! -buffer NuwikiFindOrphans call nuwiki#commands#find_orphans()
command! -buffer NuwikiRebuildTags call nuwiki#commands#tags_rebuild()
command! -buffer -nargs=? NuwikiSearchTags call nuwiki#commands#tags_search(<q-args>)
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>)
" ===== Default key mappings (parity with upstream vimwiki) =====
"
" Users can opt out by setting `g:nuwiki_no_default_mappings = 1`
" (whole layer) or by adding their own competing buffer-local maps.
if !get(g:, 'nuwiki_no_default_mappings', 0)
" Wiki prefix
nnoremap <silent><buffer> <Leader>ww :call nuwiki#commands#diary_today()<CR>
nnoremap <silent><buffer> <Leader>wt :call nuwiki#commands#diary_today()<CR>
nnoremap <silent><buffer> <Leader>ws :call nuwiki#commands#wiki_ui_select()<CR>
nnoremap <silent><buffer> <Leader>wi :call nuwiki#commands#diary_index()<CR>
nnoremap <silent><buffer> <Leader>w<Leader>w :call nuwiki#commands#diary_today()<CR>
nnoremap <silent><buffer> <Leader>w<Leader>y :call nuwiki#commands#diary_yesterday()<CR>
nnoremap <silent><buffer> <Leader>w<Leader>t :call nuwiki#commands#diary_tomorrow()<CR>
nnoremap <silent><buffer> <Leader>w<Leader>m :call nuwiki#commands#diary_tomorrow()<CR>
nnoremap <silent><buffer> <Leader>w<Leader>i :call nuwiki#commands#diary_generate_index()<CR>
" Links
nnoremap <silent><buffer> <CR> :call nuwiki#commands#follow_link_or_create()<CR>
nnoremap <silent><buffer> <S-CR> :split<CR>:call nuwiki#commands#follow_link_or_create()<CR>
nnoremap <silent><buffer> <C-CR> :vsplit<CR>:call nuwiki#commands#follow_link_or_create()<CR>
nnoremap <silent><buffer> <C-S-CR> :tabnew<CR>:call nuwiki#commands#follow_link_or_create()<CR>
nnoremap <silent><buffer> <BS> <C-o>
nnoremap <silent><buffer> <Tab> /\[\[<CR>:nohlsearch<CR>
nnoremap <silent><buffer> <S-Tab> ?\[\[<CR>:nohlsearch<CR>
nnoremap <silent><buffer> + :call nuwiki#commands#normalize_link()<CR>
xnoremap <silent><buffer> + :<C-u>call nuwiki#commands#normalize_link()<CR>
nnoremap <silent><buffer> <Leader>wn :call nuwiki#commands#wiki_goto_page('')<CR>
nnoremap <silent><buffer> <Leader>wd :call nuwiki#commands#delete_file()<CR>
nnoremap <silent><buffer> <Leader>wr :call nuwiki#commands#rename_file()<CR>
nnoremap <silent><buffer> <Leader>wc :echohl WarningMsg<bar>echom 'nuwiki: :VimwikiColorize not yet implemented — see SPEC §13.1'<bar>echohl None<CR>
xnoremap <silent><buffer> <Leader>wc :<C-u>echohl WarningMsg<bar>echom 'nuwiki: :VimwikiColorize not yet implemented — see SPEC §13.1'<bar>echohl None<CR>
" Diary nav
nnoremap <silent><buffer> <C-Down> :call nuwiki#commands#diary_next()<CR>
nnoremap <silent><buffer> <C-Up> :call nuwiki#commands#diary_prev()<CR>
" Lists
nnoremap <silent><buffer> <C-Space> :call nuwiki#commands#toggle_list_item()<CR>
xnoremap <silent><buffer> <C-Space> :<C-u>call nuwiki#commands#toggle_list_item()<CR>
nnoremap <silent><buffer> <C-@> :call nuwiki#commands#toggle_list_item()<CR>
xnoremap <silent><buffer> <C-@> :<C-u>call nuwiki#commands#toggle_list_item()<CR>
nnoremap <silent><buffer> <Nul> :call nuwiki#commands#toggle_list_item()<CR>
xnoremap <silent><buffer> <Nul> :<C-u>call nuwiki#commands#toggle_list_item()<CR>
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> 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>
nnoremap <silent><buffer> gll :call nuwiki#commands#list_change_level(1, 0)<CR>
nnoremap <silent><buffer> gLh :call nuwiki#commands#list_change_level(-1, 1)<CR>
nnoremap <silent><buffer> gLl :call nuwiki#commands#list_change_level(1, 1)<CR>
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> o :call nuwiki#commands#open_below_with_bullet()<CR>
nnoremap <silent><buffer> O :call nuwiki#commands#open_above_with_bullet()<CR>
" Headers
nnoremap <silent><buffer> = :call nuwiki#commands#heading_add()<CR>
nnoremap <silent><buffer> - :call nuwiki#commands#heading_remove()<CR>
nnoremap <silent><buffer> ]] :call nuwiki#commands#next_header()<CR>
nnoremap <silent><buffer> [[ :call nuwiki#commands#prev_header()<CR>
nnoremap <silent><buffer> ]= :call nuwiki#commands#next_sibling_header()<CR>
nnoremap <silent><buffer> [= :call nuwiki#commands#prev_sibling_header()<CR>
nnoremap <silent><buffer> ]u :call nuwiki#commands#parent_header()<CR>
nnoremap <silent><buffer> [u :call nuwiki#commands#parent_header()<CR>
" HTML export
nnoremap <silent><buffer> <Leader>wh :call nuwiki#commands#export_current()<CR>
nnoremap <silent><buffer> <Leader>whh :call nuwiki#commands#export_browse()<CR>
nnoremap <silent><buffer> <Leader>wha :call nuwiki#commands#export_all()<CR>
" Tables (deferred §13.1)
nnoremap <silent><buffer> gqq :echohl WarningMsg<bar>echom 'nuwiki: :VimwikiTableAlignQ not yet implemented — see SPEC §13.1'<bar>echohl None<CR>
nnoremap <silent><buffer> gq1 :echohl WarningMsg<bar>echom 'nuwiki: :VimwikiTableAlignQ1 not yet implemented — see SPEC §13.1'<bar>echohl None<CR>
nnoremap <silent><buffer> gww :echohl WarningMsg<bar>echom 'nuwiki: :VimwikiTableAlignW not yet implemented — see SPEC §13.1'<bar>echohl None<CR>
nnoremap <silent><buffer> gw1 :echohl WarningMsg<bar>echom 'nuwiki: :VimwikiTableAlignW1 not yet implemented — see SPEC §13.1'<bar>echohl None<CR>
nnoremap <silent><buffer> <A-Left> :echohl WarningMsg<bar>echom 'nuwiki: :VimwikiTableMoveColumnLeft not yet implemented'<bar>echohl None<CR>
nnoremap <silent><buffer> <A-Right> :echohl WarningMsg<bar>echom 'nuwiki: :VimwikiTableMoveColumnRight not yet implemented'<bar>echohl None<CR>
endif
finish
endif
" ===== Neovim path =====
" :Vimwiki* compat — every command dispatches to a Lua wrapper in
" `nuwiki.commands` that either issues a `workspace/executeCommand`
" or, for client-side operations, calls `vim.lsp.buf.*` directly.
command! -buffer -count VimwikiIndex lua require('nuwiki.commands').wiki_index(vim.v.count)
command! -buffer -count VimwikiTabIndex lua require('nuwiki.commands').wiki_tab_index(vim.v.count)
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 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()
command! -buffer VimwikiDiaryPrevDay lua require('nuwiki.commands').diary_prev()
command! -buffer VimwikiDiaryGenerateLinks lua require('nuwiki.commands').diary_generate_index()
command! -buffer VimwikiFollowLink lua vim.lsp.buf.definition()
command! -buffer VimwikiGoBackLink normal!
command! -buffer VimwikiSplitLink split | lua vim.lsp.buf.definition()
command! -buffer VimwikiVSplitLink vsplit | lua vim.lsp.buf.definition()
command! -buffer VimwikiTabnewLink tabnew | lua vim.lsp.buf.definition()
command! -buffer VimwikiTabDropLink tabnew | lua vim.lsp.buf.definition()
command! -buffer -nargs=1 VimwikiGoto lua require('nuwiki.commands').wiki_goto_page(<q-args>)
command! -buffer VimwikiBacklinks lua vim.lsp.buf.references()
command! -buffer VWB lua vim.lsp.buf.references()
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 VimwikiRenameFile 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 VimwikiRemoveDone lua require('nuwiki.commands').list_remove_done()
command! -buffer -nargs=? VimwikiListChangeLvl lua require('nuwiki.commands').list_change_lvl()
command! -buffer Vimwiki2HTML lua require('nuwiki.commands').export_current()
command! -buffer Vimwiki2HTMLBrowse lua require('nuwiki.commands').export_browse()
command! -buffer -bang VimwikiAll2HTML execute (<bang>0 ? "lua require('nuwiki.commands').export_all_force()" : "lua require('nuwiki.commands').export_all()")
command! -buffer VimwikiRss lua require('nuwiki.commands').export_rss()
command! -buffer VimwikiTOC lua require('nuwiki.commands').toc_generate()
command! -buffer VimwikiGenerateLinks lua require('nuwiki.commands').links_generate()
command! -buffer VimwikiCheckLinks lua require('nuwiki.commands').check_links()
command! -buffer VimwikiFindOrphans lua require('nuwiki.commands').find_orphans()
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>)
" §13.1 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()
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()
" Canonical :Nuwiki* aliases — P10.
command! -buffer -count NuwikiIndex lua require('nuwiki.commands').wiki_index(vim.v.count)
command! -buffer NuwikiTabIndex lua require('nuwiki.commands').wiki_tab_index(vim.v.count)
command! -buffer NuwikiUISelect lua require('nuwiki.commands').wiki_ui_select()
command! -buffer NuwikiDiaryIndex lua require('nuwiki.commands').diary_index()
command! -buffer NuwikiDiaryToday lua require('nuwiki.commands').diary_today()
command! -buffer NuwikiDiaryYesterday lua require('nuwiki.commands').diary_yesterday()
command! -buffer NuwikiDiaryTomorrow lua require('nuwiki.commands').diary_tomorrow()
command! -buffer NuwikiDiaryNext lua require('nuwiki.commands').diary_next()
command! -buffer NuwikiDiaryPrev lua require('nuwiki.commands').diary_prev()
command! -buffer NuwikiDiaryGenerateLinks lua require('nuwiki.commands').diary_generate_index()
command! -buffer NuwikiFollowLink lua vim.lsp.buf.definition()
command! -buffer NuwikiBacklinks lua vim.lsp.buf.references()
command! -buffer NuwikiDeleteFile lua require('nuwiki.commands').delete_file()
command! -buffer NuwikiRenameFile lua require('nuwiki.commands').rename_file()
command! -buffer NuwikiNextTask lua require('nuwiki.commands').next_task()
command! -buffer NuwikiToggleListItem lua require('nuwiki.commands').toggle_list_item()
command! -buffer NuwikiToggleRejected lua require('nuwiki.commands').reject_list_item()
command! -buffer NuwikiExport lua require('nuwiki.commands').export_current()
command! -buffer NuwikiExportBrowse lua require('nuwiki.commands').export_browse()
command! -buffer -bang NuwikiExportAll execute (<bang>0 ? "lua require('nuwiki.commands').export_all_force()" : "lua require('nuwiki.commands').export_all()")
command! -buffer NuwikiRss lua require('nuwiki.commands').export_rss()
command! -buffer NuwikiTOC lua require('nuwiki.commands').toc_generate()
command! -buffer NuwikiGenerateLinks lua require('nuwiki.commands').links_generate()
command! -buffer NuwikiCheckLinks lua require('nuwiki.commands').check_links()
command! -buffer NuwikiFindOrphans lua require('nuwiki.commands').find_orphans()
command! -buffer NuwikiRebuildTags lua require('nuwiki.commands').tags_rebuild()
command! -buffer -nargs=? NuwikiSearchTags lua require('nuwiki.commands').tags_search(<q-args>)
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.
lua require('nuwiki.ftplugin').attach(0)