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:
@@ -234,6 +234,7 @@ require('nuwiki').setup({
|
||||
exclude_files = {}, -- glob patterns
|
||||
-- Checkbox progression characters: " .oOX" by default.
|
||||
listsyms = ' .oOX',
|
||||
listsym_rejected = '-', -- glyph for a cancelled checkbox [-]
|
||||
listsyms_propagate = true,
|
||||
},
|
||||
},
|
||||
@@ -327,6 +328,7 @@ Each is a boolean. All default to `true` except `mouse`.
|
||||
| `diary_sort` | string | `'desc'` | `'desc'` \| `'asc'` |
|
||||
| `diary_header` | string | `'Diary'` | any heading text |
|
||||
| `listsyms` | string | `' .oOX'` | checkbox progression chars |
|
||||
| `listsym_rejected` | string | `'-'` | glyph for a cancelled checkbox (`[-]`); first char used |
|
||||
| `listsyms_propagate` | bool | `true` | `true` \| `false` |
|
||||
| `list_margin` | int | `-1` | `-1` (auto) or `≥ 0` |
|
||||
| `links_space_char` | string | `' '` | char that replaces spaces in synthesised link paths |
|
||||
|
||||
Reference in New Issue
Block a user