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:
+90
-43
@@ -467,20 +467,22 @@ fix site.
|
||||
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
|
||||
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
|
||||
(`vars.vim:184`, default `0`): don't expand the last column separator to fill
|
||||
the cell. nuwiki absent. Low impact (off by default). _Fix:_ thread a flag into
|
||||
the table-format routine.
|
||||
- [ ] **`user_htmls`** _(new, 2026-06-03 re-audit)_ — upstream global
|
||||
(`vars.vim:191`, default `''`): comma-separated HTML files with no wiki source
|
||||
that `:VimwikiAll2HTML` must not delete. nuwiki absent — only relevant if
|
||||
nuwiki's all-to-HTML prunes orphan HTML (it may not, in which case this is moot
|
||||
and worth a one-line divergence note rather than code).
|
||||
- [ ] **`hl_headers` / `hl_cb_checked`** _(new, 2026-06-03 re-audit)_ — upstream
|
||||
globals (`vars.vim:158`/`157`, both default `0`): per-level header highlight /
|
||||
checked-checkbox line highlight. nuwiki absent. Borderline — either implement
|
||||
via highlight groups/semantic tokens, or fold into the `conceal*`/`maxhi`
|
||||
highlighting-divergence family so future audits stop flagging them.
|
||||
- [x] **`table_reduce_last_col`** _(fixed 2026-06-03)_ — per-wiki flag (default
|
||||
off): `column_widths` clamps the last table column to width 1 so it isn't
|
||||
padded to fill; threaded through `table_align_edit`/`table_move_column_edit`
|
||||
and both table commands. Test `table_reduce_last_col_keeps_last_column_minimal`.
|
||||
- [x] **`user_htmls`** _(fixed 2026-06-03)_ — `allToHtml` now prunes orphan HTML
|
||||
(no wiki source) under `html_path` (`export_ops::prune_orphan_html`), skipping
|
||||
the CSS file and any basename in `user_htmls`; gated on
|
||||
`!html_filename_parameterization` (mirrors upstream). Test
|
||||
`prune_orphan_html_deletes_sourceless_keeps_protected`.
|
||||
- [x] **`hl_headers` / `hl_cb_checked`** _(resolved as divergence 2026-06-03)_ —
|
||||
upstream opt-in toggles (default off) that turn ON per-level header / checked-
|
||||
checkbox highlighting. nuwiki **already** highlights headers per-level
|
||||
(`@vimwikiHeading.level1..6`) and checkboxes always-on via LSP semantic
|
||||
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,
|
||||
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
|
||||
@@ -525,32 +527,48 @@ fix site.
|
||||
the field doc.) Tests: `diary_caption_level_accepts_negative`
|
||||
(`index_and_config.rs`), `build_index_body_clamps_negative_caption_level_to_zero`
|
||||
(`diary.rs`).
|
||||
- [ ] `auto_header` — auto H1-from-filename on new page (server-side).
|
||||
- [ ] `create_link` — toggle to suppress link-target creation.
|
||||
- [ ] `dir_link` — index file to open when following a directory link.
|
||||
- [ ] `auto_chdir` — `:cd` into wiki root on open (client-side).
|
||||
- [ ] `bullet_types` / `cycle_bullets` — custom bullet glyphs + wrap-around.
|
||||
- [ ] `commentstring` (`'%%%s'`) — comment toggling/text-objects. _(2026-06-03
|
||||
re-audit: also a value mismatch — nuwiki hardcodes `%% %s` (with a space) in
|
||||
`ftplugin/vimwiki.vim:18` vs upstream's no-space `%%%s`; align when picked up.)_
|
||||
- [ ] `color_tag_template` — `color_dic` present; template regex missing.
|
||||
Related divergence _(2026-05-31 config re-audit)_: nuwiki's `color_dic`
|
||||
defaults to **empty** while upstream ships a populated palette
|
||||
(`default`/`red`/…). Documented accurately on the nuwiki side (so it's not a
|
||||
doc↔code mismatch); the renderer falls back to `class="color-<name>"`. Decide
|
||||
whether to seed a default palette or keep empty-by-design.
|
||||
- [ ] `rss_max_items` / `rss_name` — `:Rss` output hardcoded. _Fix:_ `HtmlConfig`.
|
||||
- [ ] **RSS feed structure fidelity** _(new, 2026-05-31 base_url audit)_ —
|
||||
nuwiki's `write_rss` is intentionally minimal (title/link/guid). Upstream
|
||||
emits more: channel `<link>` points at the diary index page
|
||||
(`base_url + diary_rel_path + diary_index + .html`, nuwiki uses bare
|
||||
`base_url`); per-item `<guid isPermaLink="false">` holds the bare date
|
||||
basename (nuwiki uses the full URL, no attribute); plus `<atom:link rel=
|
||||
"self">`, channel/item `<pubDate>` (from mtime), and a `<![CDATA[…]]>`
|
||||
rendered-HTML body per item. `base_url`'s *scope* is faithful (RSS-only,
|
||||
not inter-page links) and the `custom_wiki2html` arg contract is an exact
|
||||
match — only the feed document shape diverges.
|
||||
- [ ] `emoji_enable` — emoji substitution.
|
||||
- [x] **`auto_header`** _(fixed 2026-06-03)_ — new wiki pages get a `= Stem =`
|
||||
H1 from the filename, skipping the wiki/diary index. Client `BufNewFile`
|
||||
autocmd, both clients (`init.lua` + `plugin/nuwiki.vim`; `auto_header`
|
||||
handlers in both command layers). Default off.
|
||||
- [x] **`create_link`** _(fixed 2026-06-03)_ — server `resolve_target_uri` only
|
||||
synthesises a missing-page URI when `create_link` is set; off → following a
|
||||
missing link is a no-op. Default true.
|
||||
- [x] **`dir_link`** _(fixed 2026-06-03)_ — a `[[dir/]]` link resolves to
|
||||
`<dir>/<dir_link><ext>` when set, else opens the directory
|
||||
(`resolve_target_uri`, using `LinkTarget.is_directory`).
|
||||
- [x] **`auto_chdir`** _(fixed 2026-06-03)_ — `:lcd` into the owning wiki root on
|
||||
buffer enter; both clients (`ftplugin.lua` `setup_auto_chdir` /
|
||||
`NuwikiAutoChdir` augroup), via `wiki_root_for` resolvers. Default off.
|
||||
- [x] **`bullet_types` / `cycle_bullets`** _(fixed 2026-06-03)_ — per-wiki
|
||||
`bullet_types` (default `-`,`*`,`#`) + `cycle_bullets` (default off): on
|
||||
indent/dedent of an unordered item, `change_level_edit` rotates the glyph
|
||||
through `bullet_types` (depth-keyed ring). Tests `cycle_bullets_*`.
|
||||
- [x] **`commentstring`** _(fixed 2026-06-03)_ — aligned to upstream's no-space
|
||||
`%%%s` (`ftplugin/vimwiki.vim`); comment parsing is independent (lexer).
|
||||
- [x] **`color_tag_template`** _(fixed 2026-06-03)_ — `:VimwikiColorize` now
|
||||
wraps via a configurable template (`color_tag_template` / `g:nuwiki_color_tag_template`,
|
||||
split on `__CONTENT__` with `__COLORFG__` → colour), both clients; colour
|
||||
spans render in HTML export via the `valid_html_tags` `span` passthrough.
|
||||
`color_dic` now ships a populated default palette (red/green/blue/…) instead
|
||||
of empty.
|
||||
- [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:_
|
||||
`HtmlConfig` (`config.rs`) gained `html_header_numbering: u8` (start level,
|
||||
`0` = off) + `html_header_numbering_sym: String` (trailing symbol), both
|
||||
@@ -564,9 +582,25 @@ fix site.
|
||||
`…_numbering_skips_headers_above_start_level`,
|
||||
`…_no_header_numbering_by_default` (`html_export.rs`) + config round-trip +
|
||||
defaults (`index_and_config.rs`).
|
||||
- [ ] `valid_html_tags` — allowed inline HTML tags in export.
|
||||
- [ ] `generated_links_caption`, `toc_link_format`, `markdown_link_ext`.
|
||||
- [ ] `list_ignore_newline` / `text_ignore_newline` — export newline handling.
|
||||
- [x] **`valid_html_tags`** _(fixed 2026-06-03)_ — HTML export passes the
|
||||
allowlisted inline tags through verbatim and escapes the rest, via a
|
||||
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
|
||||
- [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
|
||||
the text). Both client-side, both clients, tested in both harnesses (Neovim
|
||||
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).
|
||||
|
||||
Reference in New Issue
Block a user