fix(review): close all 2026-06-03 codebase-review findings (R1-R18)
Resolves the 18 findings from the parallel codebase review, tracked in development/vimwiki-gap.md. Correctness / perf: - Wiki.config -> Arc<WikiConfig> so cloning a Wiki is a refcount bump (R5) - WorkspaceIndex::remove is no longer O(n^2): a per-source contributions map limits the scan to buckets the source actually wrote into (R6) - render_color now expands color_tag_template (__STYLE__/__CONTENT__), consuming the previously-dead field; ColorNode documented as an extension point; 3 renderer tests added (R3/R4) - wiki_root_for returns empty/nil on no-match instead of falling back to the first wiki (R2); auto_header honours links_space_char (R7) Cleanup / dedup: - Remove dead #[allow(dead_code)] stubs + uncalled pub helpers, narrow imports (R10/R11) - Dedup span_of_inline x3 -> InlineNode::span() (R12) - diary_step single read lock; page_captions single pass (R13) - Lua auto_header loop -> wiki_list(); detect_current_symbol cleanup (R14/R18) Client / docs: - :VimwikiNormalizeLink Vim cmds -> <q-args> (R17); ftplugin header fix (R16); vars.vim multi-wiki limitation documented (R15) - Document 19 config options in README.md + doc/nuwiki.txt; fix list_margin/shiftwidth doc and stale comments (R1/R9) - R8 investigated, confirmed not a real bug (documented) Verified: Neovim harness 307, Vim harness 301/18/21, Rust suite 568, all 0 failed; clippy clean; fresh parallel-agent audit found no regressions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -309,6 +309,9 @@ let g:nuwiki_mouse_mappings = 0 " set to 1 to enable mouse maps
|
||||
| `folding` | string | `'lsp'` | `'lsp'` \| `'expr'` \| `'off'` |
|
||||
| `autowriteall` | bool | `true` | mirror Vim's `'autowriteall'` while in a wiki buffer (vimwiki `autowriteall`); Vim users set `g:nuwiki_autowriteall` |
|
||||
| `table_auto_fmt` | bool | `true` | re-align the table under the cursor on `InsertLeave` (vimwiki `table_auto_fmt`); Vim users set `g:nuwiki_table_auto_fmt` |
|
||||
| `auto_chdir` | bool | `false` | `:lcd` into the owning wiki's root when a wiki buffer becomes current (vimwiki `auto_chdir`); Vim users set `g:nuwiki_auto_chdir` |
|
||||
| `auto_header` | bool | `false` | insert a level-1 header from the filename on new wiki pages (vimwiki `auto_header`); honours `links_space_char`. Vim users set `g:nuwiki_auto_header` |
|
||||
| `use_calendar` | bool | `true` | wire up calendar-vim integration when it's on the runtimepath (`g:calendar_action`/`g:calendar_sign`); set `false` (or `g:nuwiki_no_calendar`) to opt out |
|
||||
| `wikis` | list of tables | `nil` | per-wiki tables (see below); wins over the single-wiki shorthand |
|
||||
| `mappings` | table | all on | keymap subgroups (see below) |
|
||||
| `diagnostic` | table | `{ link_severity = 'warn' }` | `link_severity`: `'off'` \| `'hint'` \| `'warn'` \| `'error'` |
|
||||
@@ -349,6 +352,14 @@ The `<Leader>w` prefix in the `wiki_prefix`, `links`, and `html_export` rows is
|
||||
| `diary_caption_level` | int | `0` | `0`–`6` (level of the index caption) |
|
||||
| `diary_sort` | string | `'desc'` | `'desc'` \| `'asc'` |
|
||||
| `diary_header` | string | `'Diary'` | any heading text |
|
||||
| `diary_months` | list | English month names | month-number → display name used in the diary index |
|
||||
| `create_link` | bool | `true` | create the target page when following a link to a missing page; `false` makes the follow a no-op |
|
||||
| `dir_link` | string | `''` | index stem opened when following a link to a directory (e.g. `'index'`); empty opens the directory itself |
|
||||
| `bullet_types` | list | `['-', '*', '#']` | unordered-bullet glyphs for this wiki; drives `cycle_bullets` |
|
||||
| `cycle_bullets` | bool | `false` | rotate an unordered item's glyph through `bullet_types` as it is indented/dedented |
|
||||
| `generated_links_caption` | bool | `false` | emit `[[page\|Heading]]` (first heading as caption) from `:VimwikiGenerateLinks` |
|
||||
| `toc_link_format` | int | `0` | `0` = `[[#anchor\|title]]` (with description); `1` = `[[#anchor]]` (anchor only) |
|
||||
| `table_reduce_last_col` | bool | `false` | don't pad the last table column to fill — keep it at its minimum width |
|
||||
| `listsyms` | string | `' .oOX'` | checkbox progression chars |
|
||||
| `listsym_rejected` | string | `'-'` | glyph for a cancelled checkbox (`[-]`); first char used |
|
||||
| `listsyms_propagate` | bool | `true` | `true` \| `false` |
|
||||
@@ -378,7 +389,15 @@ The `<Leader>w` prefix in the `wiki_prefix`, `links`, and `html_export` rows is
|
||||
| `custom_wiki2html_args` | string | `''` | extra args appended to the `custom_wiki2html` call |
|
||||
| `base_url` | string | `''` | public URL prefix; when set, diary RSS item links become `<base_url><diary_rel_path>/<date>.html` instead of `file://` |
|
||||
| `exclude_files` | list | `{}` | glob patterns |
|
||||
| `color_dic` | table | `{}` | `{ name = 'color', … }` |
|
||||
| `color_dic` | table | `{}` | `{ name = 'color', … }` colour-tag name → CSS value |
|
||||
| `color_tag_template` | string | `'<span style="__STYLE__">__CONTENT__</span>'` | template for a `color_dic` colour span; `__STYLE__` → `color:<css>`, `__CONTENT__` → inner HTML |
|
||||
| `valid_html_tags` | string | `'b,i,s,u,sub,sup,kbd,br,hr,div,center,strong,em'` | comma-separated inline HTML tags passed through export unescaped (`span` is always allowed) |
|
||||
| `emoji_enable` | bool | `true` | substitute `:alias:` emoji shortcodes with their glyph during export |
|
||||
| `text_ignore_newline` | bool | `true` | a single newline inside a paragraph is a space in HTML; `false` → `<br>` |
|
||||
| `list_ignore_newline` | bool | `true` | a single newline inside a list item is a space in HTML; `false` → `<br>` |
|
||||
| `rss_name` | string | `'rss.xml'` | filename of the generated diary RSS feed, relative to `html_path` |
|
||||
| `rss_max_items` | int | `10` | cap on the number of diary items in the RSS feed |
|
||||
| `user_htmls` | list | `{}` | basenames of HTML files with no wiki source that `:VimwikiAll2HTML` must not prune |
|
||||
|
||||
#### Vim globals (`g:nuwiki_*`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user