feat(config): make listsym_rejected configurable (P2)

The rejected/cancelled checkbox glyph was a hardcoded `const REJECTED = '-'`.
ListSyms now carries a `rejected` field (new_with_rejected); a per-wiki
`listsym_rejected` key (default `-`) is added to WikiConfig, and
WikiConfig::list_syms() builds the palette with it. Routed the three
config-driven ListSyms construction sites (parse path in lib.rs + the
toggle/cycle commands) through list_syms(), so a custom rejected glyph both
lexes and round-trips.

Tests: listsyms::custom_rejected_glyph_is_honoured + config round-trip.
README/doc/lua config comment updated. fmt clean; 0 Rust test failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-31 18:33:25 +00:00
parent 624bccbe50
commit 2d3db458fb
9 changed files with 76 additions and 17 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ impl Backend {
fn parse_for_uri(&self, uri: &Url, text: &str) -> nuwiki_core::ast::DocumentNode {
let syms = self
.wiki_for_uri(uri)
.map(|w| nuwiki_core::listsyms::ListSyms::new(&w.config.listsyms))
.map(|w| w.config.list_syms())
.unwrap_or_default();
nuwiki_core::syntax::vimwiki::VimwikiSyntax::new().parse_with_listsyms(text, &syms)
}