fix(diary): default diary_caption_level to 0 (upstream parity)
nuwiki defaulted the per-wiki diary_caption_level to 1; upstream vimwiki's default is 0 (year captions at the top level, months one below, rather than nested one deeper). Default it to 0 in wiki_defaults(); still per-wiki overridable. Render tests pass an explicit level so are unaffected; the default-value assertion in defaults_carry_vimwiki_per_wiki_keys updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -288,7 +288,9 @@ fn wiki_defaults() -> WikiDefaults {
|
||||
diary_rel_path: default_diary_rel_path(),
|
||||
diary_index: default_diary_index(),
|
||||
diary_frequency: default_diary_frequency(),
|
||||
diary_caption_level: 1,
|
||||
// Match upstream vimwiki's `diary_caption_level` default of 0 (year
|
||||
// captions at the top level, months one below). Users override per-wiki.
|
||||
diary_caption_level: 0,
|
||||
diary_sort: default_diary_sort(),
|
||||
diary_header: default_diary_header(),
|
||||
listsyms: default_listsyms(),
|
||||
|
||||
@@ -267,7 +267,7 @@ fn defaults_carry_vimwiki_per_wiki_keys() {
|
||||
let cfg = WikiConfig::empty();
|
||||
assert_eq!(cfg.index, "index");
|
||||
assert_eq!(cfg.diary_frequency, "daily");
|
||||
assert_eq!(cfg.diary_caption_level, 1);
|
||||
assert_eq!(cfg.diary_caption_level, 0); // upstream default
|
||||
assert_eq!(cfg.diary_sort, "desc");
|
||||
assert_eq!(cfg.diary_header, "Diary");
|
||||
assert_eq!(cfg.listsyms, " .oOX");
|
||||
|
||||
@@ -105,8 +105,10 @@ fix site.
|
||||
`badd_link` in the links group of both clients (`lua/nuwiki/keymaps.lua`,
|
||||
`ftplugin/vimwiki.vim`; docs + README updated). Covered by `map[n].<M-CR>` in
|
||||
both keymap harnesses.
|
||||
- [ ] **`diary_caption_level` default divergence** — nuwiki `1` vs vimwiki `0`.
|
||||
_Fix:_ `config.rs:291` (and defaults in `lua/nuwiki/config.lua`).
|
||||
- [x] **`diary_caption_level` default divergence** — nuwiki defaulted to `1`,
|
||||
upstream `0`. _Fix:_ `wiki_defaults()` in `crates/nuwiki-lsp/src/config.rs` now
|
||||
defaults `diary_caption_level: 0` (year captions top-level, months one below),
|
||||
still per-wiki overridable. Test `defaults_carry_vimwiki_per_wiki_keys` updated.
|
||||
- [ ] **`diary_start_week_day`** — **wrongly removed** in `c63ec67`. The removal
|
||||
treated it as a server concern and hardwired the weekly diary to ISO-Monday
|
||||
(`crates/nuwiki-core/src/date.rs` `monday_of_iso_week`), but choosing which
|
||||
|
||||
Reference in New Issue
Block a user