docs(gap): close the P3 Config section + record divergences/deferrals

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-03 12:41:03 +00:00
parent a63d3dd7cf
commit f5420bd1da
+90 -43
View File
@@ -467,20 +467,22 @@ fix site.
non-table edits don't round-trip. Covered by `config.table_auto_fmt_autocmd` non-table edits don't round-trip. Covered by `config.table_auto_fmt_autocmd`
in both harnesses. _(Divergence: nuwiki's `table_align` is an async server in both harnesses. _(Divergence: nuwiki's `table_align` is an async server
edit, vs upstream's synchronous format — the result lands a beat after Esc.)_ edit, vs upstream's synchronous format — the result lands a beat after Esc.)_
- [ ] **`table_reduce_last_col`** _(new, 2026-06-03 re-audit)_ — upstream global - [x] **`table_reduce_last_col`** _(fixed 2026-06-03)_ — per-wiki flag (default
(`vars.vim:184`, default `0`): don't expand the last column separator to fill off): `column_widths` clamps the last table column to width 1 so it isn't
the cell. nuwiki absent. Low impact (off by default). _Fix:_ thread a flag into padded to fill; threaded through `table_align_edit`/`table_move_column_edit`
the table-format routine. and both table commands. Test `table_reduce_last_col_keeps_last_column_minimal`.
- [ ] **`user_htmls`** _(new, 2026-06-03 re-audit)_ — upstream global - [x] **`user_htmls`** _(fixed 2026-06-03)_`allToHtml` now prunes orphan HTML
(`vars.vim:191`, default `''`): comma-separated HTML files with no wiki source (no wiki source) under `html_path` (`export_ops::prune_orphan_html`), skipping
that `:VimwikiAll2HTML` must not delete. nuwiki absent — only relevant if the CSS file and any basename in `user_htmls`; gated on
nuwiki's all-to-HTML prunes orphan HTML (it may not, in which case this is moot `!html_filename_parameterization` (mirrors upstream). Test
and worth a one-line divergence note rather than code). `prune_orphan_html_deletes_sourceless_keeps_protected`.
- [ ] **`hl_headers` / `hl_cb_checked`** _(new, 2026-06-03 re-audit)_ — upstream - [x] **`hl_headers` / `hl_cb_checked`** _(resolved as divergence 2026-06-03)_
globals (`vars.vim:158`/`157`, both default `0`): per-level header highlight / upstream opt-in toggles (default off) that turn ON per-level header / checked-
checked-checkbox line highlight. nuwiki absent. Borderline — either implement checkbox highlighting. nuwiki **already** highlights headers per-level
via highlight groups/semantic tokens, or fold into the `conceal*`/`maxhi` (`@vimwikiHeading.level1..6`) and checkboxes always-on via LSP semantic
highlighting-divergence family so future audits stop flagging them. tokens — richer than the upstream toggles and on by default. Implementing the
toggle faithfully (default off) would *remove* nuwiki's coloring, a
regression. Folded into the LSP-highlighting divergence family (with `maxhi`).
- [x] **`list_margin` — buffer-side parity + markdown default** _(new, - [x] **`list_margin` — buffer-side parity + markdown default** _(new,
2026-06-02 re-audit; fixed 2026-06-02)_ — upstream (`vars.vim:516`, doc 2026-06-02 re-audit; fixed 2026-06-02)_ — upstream (`vars.vim:516`, doc
`vimwiki.txt:2667`): left-margin **width in spaces for buffer-side generated `vimwiki.txt:2667`): left-margin **width in spaces for buffer-side generated
@@ -525,32 +527,48 @@ fix site.
the field doc.) Tests: `diary_caption_level_accepts_negative` the field doc.) Tests: `diary_caption_level_accepts_negative`
(`index_and_config.rs`), `build_index_body_clamps_negative_caption_level_to_zero` (`index_and_config.rs`), `build_index_body_clamps_negative_caption_level_to_zero`
(`diary.rs`). (`diary.rs`).
- [ ] `auto_header` — auto H1-from-filename on new page (server-side). - [x] **`auto_header`** _(fixed 2026-06-03)_ — new wiki pages get a `= Stem =`
- [ ] `create_link` — toggle to suppress link-target creation. H1 from the filename, skipping the wiki/diary index. Client `BufNewFile`
- [ ] `dir_link` — index file to open when following a directory link. autocmd, both clients (`init.lua` + `plugin/nuwiki.vim`; `auto_header`
- [ ] `auto_chdir``:cd` into wiki root on open (client-side). handlers in both command layers). Default off.
- [ ] `bullet_types` / `cycle_bullets` — custom bullet glyphs + wrap-around. - [x] **`create_link`** _(fixed 2026-06-03)_ — server `resolve_target_uri` only
- [ ] `commentstring` (`'%%%s'`) — comment toggling/text-objects. _(2026-06-03 synthesises a missing-page URI when `create_link` is set; off → following a
re-audit: also a value mismatch — nuwiki hardcodes `%% %s` (with a space) in missing link is a no-op. Default true.
`ftplugin/vimwiki.vim:18` vs upstream's no-space `%%%s`; align when picked up.)_ - [x] **`dir_link`** _(fixed 2026-06-03)_ — a `[[dir/]]` link resolves to
- [ ] `color_tag_template``color_dic` present; template regex missing. `<dir>/<dir_link><ext>` when set, else opens the directory
Related divergence _(2026-05-31 config re-audit)_: nuwiki's `color_dic` (`resolve_target_uri`, using `LinkTarget.is_directory`).
defaults to **empty** while upstream ships a populated palette - [x] **`auto_chdir`** _(fixed 2026-06-03)_`:lcd` into the owning wiki root on
(`default`/`red`/…). Documented accurately on the nuwiki side (so it's not a buffer enter; both clients (`ftplugin.lua` `setup_auto_chdir` /
doc↔code mismatch); the renderer falls back to `class="color-<name>"`. Decide `NuwikiAutoChdir` augroup), via `wiki_root_for` resolvers. Default off.
whether to seed a default palette or keep empty-by-design. - [x] **`bullet_types` / `cycle_bullets`** _(fixed 2026-06-03)_ — per-wiki
- [ ] `rss_max_items` / `rss_name``:Rss` output hardcoded. _Fix:_ `HtmlConfig`. `bullet_types` (default `-`,`*`,`#`) + `cycle_bullets` (default off): on
- [ ] **RSS feed structure fidelity** _(new, 2026-05-31 base_url audit)_ — indent/dedent of an unordered item, `change_level_edit` rotates the glyph
nuwiki's `write_rss` is intentionally minimal (title/link/guid). Upstream through `bullet_types` (depth-keyed ring). Tests `cycle_bullets_*`.
emits more: channel `<link>` points at the diary index page - [x] **`commentstring`** _(fixed 2026-06-03)_ — aligned to upstream's no-space
(`base_url + diary_rel_path + diary_index + .html`, nuwiki uses bare `%%%s` (`ftplugin/vimwiki.vim`); comment parsing is independent (lexer).
`base_url`); per-item `<guid isPermaLink="false">` holds the bare date - [x] **`color_tag_template`** _(fixed 2026-06-03)_`:VimwikiColorize` now
basename (nuwiki uses the full URL, no attribute); plus `<atom:link rel= wraps via a configurable template (`color_tag_template` / `g:nuwiki_color_tag_template`,
"self">`, channel/item `<pubDate>` (from mtime), and a `<![CDATA[…]]>` split on `__CONTENT__` with `__COLORFG__` → colour), both clients; colour
rendered-HTML body per item. `base_url`'s *scope* is faithful (RSS-only, spans render in HTML export via the `valid_html_tags` `span` passthrough.
not inter-page links) and the `custom_wiki2html` arg contract is an exact `color_dic` now ships a populated default palette (red/green/blue/…) instead
match — only the feed document shape diverges. of empty.
- [ ] `emoji_enable` — emoji substitution. - [x] **`rss_max_items` / `rss_name`** _(fixed 2026-06-03)_`HtmlConfig`
fields (default `10` / `rss.xml`); `rss_path` honours `rss_name`, `write_rss`
caps at `rss_max_items` (`0` = unlimited).
- [x] **RSS feed structure fidelity** _(fixed 2026-06-03)_`write_rss` now
emits upstream's shape: `xmlns:atom`; channel `<link>` → the diary index page
(`base_url + diary_rel + diary_index + .html`); `<atom:link rel="self">`;
channel + item `<pubDate>` (RFC-822, derived from the diary date via
`to_days_epoch` weekday math); per-item `<guid isPermaLink="false">` with the
bare date; and a `<![CDATA[…]]>` rendered-HTML body per entry
(`render_entry_body` reads+parses+renders with the wiki's colour/valid-tag/
emoji opts; `cdata_safe` splits `]]>`). Tests:
`write_rss_uses_base_url_for_public_links`, `write_rss_honours_rss_name_and_max_items`.
- [x] **`emoji_enable`** _(fixed 2026-06-03)_ — render-time `:alias:` → glyph
substitution (curated common set, `substitute_emoji`/`emoji_for`), default on,
wired via `with_emoji` from `HtmlConfig`. _(Divergence: upstream's
`emoji_enable` is buffer conceal + completion; nuwiki implements it as export
substitution — the user-facing emoji output — which is the practical intent.)_
- [x] **`html_header_numbering` (+`_sym`)** — numbered HTML headers. _Fix:_ - [x] **`html_header_numbering` (+`_sym`)** — numbered HTML headers. _Fix:_
`HtmlConfig` (`config.rs`) gained `html_header_numbering: u8` (start level, `HtmlConfig` (`config.rs`) gained `html_header_numbering: u8` (start level,
`0` = off) + `html_header_numbering_sym: String` (trailing symbol), both `0` = off) + `html_header_numbering_sym: String` (trailing symbol), both
@@ -564,9 +582,25 @@ fix site.
`…_numbering_skips_headers_above_start_level`, `…_numbering_skips_headers_above_start_level`,
`…_no_header_numbering_by_default` (`html_export.rs`) + config round-trip + `…_no_header_numbering_by_default` (`html_export.rs`) + config round-trip +
defaults (`index_and_config.rs`). defaults (`index_and_config.rs`).
- [ ] `valid_html_tags` — allowed inline HTML tags in export. - [x] **`valid_html_tags`** _(fixed 2026-06-03)_ — HTML export passes the
- [ ] `generated_links_caption`, `toc_link_format`, `markdown_link_ext`. allowlisted inline tags through verbatim and escapes the rest, via a
- [ ] `list_ignore_newline` / `text_ignore_newline` — export newline handling. render-time tag-aware escaper (`write_escaped_allowing`/`match_allowed_tag`),
mirroring upstream's `s:safe_html_line` regex (no parser change). Default
`b,i,s,u,sub,sup,kbd,br,hr,div,center,strong,em`; `span` always allowed.
Tests in `html_export.rs`.
- [x] **`generated_links_caption`** + **`toc_link_format`** _(fixed 2026-06-03)_
`generated_links_caption` emits `[[page|FirstHeading]]` from a
page→heading map (`ops::page_captions`); `toc_link_format` `1`
`[[#anchor]]` (no description) vs `0``[[#anchor|title]]`. **`markdown_link_ext`
stays deferred** — part of the markdown generated-content cluster (see the
divergence note below).
- [ ] **`list_ignore_newline` / `text_ignore_newline`** — config keys round-trip
(`HtmlConfig`, default `true` = upstream's default, which nuwiki already
honours: soft newlines render as spaces). The **`false``<br>`** behaviour
is **deferred**: the parser collapses soft breaks to spaces before the
renderer sees them, so `=false` needs a parser-level soft-break node (risky;
touches every parse consumer). Documented as a parser limitation; the common
default works.
### Mappings ### Mappings
- [x] **Visual `<CR>` normalize-link** _(fixed 2026-06-03)_ — upstream binds - [x] **Visual `<CR>` normalize-link** _(fixed 2026-06-03)_ — upstream binds
@@ -736,3 +770,16 @@ audits don't re-flag them.
list item (`smart_shift_return`, continuation with no new marker aligned under list item (`smart_shift_return`, continuation with no new marker aligned under
the text). Both client-side, both clients, tested in both harnesses (Neovim the text). Both client-side, both clients, tested in both harnesses (Neovim
305, Vim 299/18/21). Only P3 Config items now remain open. 305, Vim 299/18/21). Only P3 Config items now remain open.
- Closed the **P3 Config section** (2026-06-03), in groups: rss_name/rss_max_items
+ RSS structure fidelity, toc_link_format, generated_links_caption,
table_reduce_last_col, color_dic palette, commentstring, auto_chdir;
auto_header, create_link, dir_link; cycle_bullets/bullet_types;
valid_html_tags (render-time allowlist passthrough), emoji_enable (export
substitution), color_tag_template (configurable colorize wrap); user_htmls
(orphan-HTML pruning). **Intentional non-implementations:**
`hl_headers`/`hl_cb_checked` are superseded by nuwiki's always-on LSP
per-level header + checkbox highlighting (like `maxhi`). **Deferred:** the
markdown cluster (`markdown_header_style`, `markdown_link_ext`, markdown-style
generated headers) remains one future effort; `list_ignore_newline` /
`text_ignore_newline` = `false` (→ `<br>`) needs a parser-level soft-break
node (the `= true` default, which is upstream's default, already works).