feat(config): read g:vimwiki_list on Neovim too (lazy.nvim drop-in)
The g:vimwiki_* drop-in was Vim-only: the Lua client read only setup() opts and g:nuwiki_wikis, so swapping the vimwiki plugin for nuwiki under lazy.nvim left the existing vim.g.vimwiki_list ignored and nuwiki pointed at the default ~/vimwiki. Mirror autoload/nuwiki/config.vim on the Lua side: config.lua now owns a single resolver (M.wikis / M.scalar_globals) that resolves setup() wikis → g:nuwiki_wikis → g:vimwiki_list (translating path->root, path_html->html_path, template_*, ext->file_extension, …) and folds the global scalar defaults (g:vimwiki_* then g:nuwiki_* then explicit setup() values; built-in defaults excluded). lsp.lua (payload) and wiki_cfg/wiki_list (buffer commands) both route through it, so the server and <Leader>ww agree on the wikis. Extends test-global-shorthand (15 checks) with the vimwiki_list drop-in + buffer-command resolution + native-wins cases. Config-parity goldens and keymap harnesses green on both clients. README + known-issues updated (drop-in is now Vim & Neovim). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -679,15 +679,17 @@ match vimwiki. To migrate:
|
||||
3. Keep your existing config, or point `wiki_root` / `wikis[i].root` at
|
||||
your directory.
|
||||
|
||||
**Existing `g:vimwiki_list` config works as-is (Vim).** When you haven't
|
||||
configured nuwiki natively (`g:nuwiki_wikis` / `g:nuwiki_*`), the Vim
|
||||
client reads your upstream `g:vimwiki_list` and `g:vimwiki_*` globals and
|
||||
translates them: each wiki's `path`/`path_html`/`template_*`/`auto_export`
|
||||
**Existing `g:vimwiki_list` config works as-is (Vim & Neovim).** When you
|
||||
haven't configured nuwiki natively (`g:nuwiki_wikis` / `setup()` / `g:nuwiki_*`),
|
||||
both clients read your upstream `g:vimwiki_list` and `g:vimwiki_*` globals and
|
||||
translate them: each wiki's `path`/`path_html`/`template_*`/`auto_export`
|
||||
plus globals like `toc_header_level`, `html_header_numbering`,
|
||||
`html_header_numbering_sym`, `links_space_char`, and `list_margin`.
|
||||
Native `g:nuwiki_*` config always takes precedence. (Settings nuwiki
|
||||
implements differently — see [`known-issues.md`](./known-issues.md) — are
|
||||
ignored.)
|
||||
Native config always takes precedence. (Settings nuwiki implements
|
||||
differently — see [`known-issues.md`](./known-issues.md) — are ignored.)
|
||||
On Neovim with lazy.nvim, swap the `vimwiki` plugin spec for nuwiki and
|
||||
call `require('nuwiki').setup()` — your `vim.g.vimwiki_list` is picked up
|
||||
unchanged.
|
||||
|
||||
Existing pages, diary entries, tags, and templates work without
|
||||
modification. The first workspace scan after launch may show an empty
|
||||
|
||||
Reference in New Issue
Block a user