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:
+8
-7
@@ -128,15 +128,16 @@ correct as-is; the deferral is a deliberate risk/reward call.
|
||||
|
||||
## Notes
|
||||
|
||||
- **Upstream `g:vimwiki_list` config (Vim).** When you haven't configured
|
||||
nuwiki natively, the Vim client reads your upstream `g:vimwiki_list` +
|
||||
`g:vimwiki_*` globals and translates them into nuwiki's schema (per-wiki
|
||||
- **Upstream `g:vimwiki_list` config (Vim & Neovim).** When you haven't
|
||||
configured nuwiki natively, both clients read your upstream `g:vimwiki_list` +
|
||||
`g:vimwiki_*` globals and translate them into nuwiki's schema (per-wiki
|
||||
`path`/`path_html`/`template_*`/`auto_export`, plus globals `toc_header`,
|
||||
`toc_header_level`, `html_header_numbering`, `html_header_numbering_sym`,
|
||||
`links_space_char`, `list_margin`). `g:nuwiki_*` always wins. Globals nuwiki
|
||||
doesn't model (e.g. `automatic_nested_syntaxes`) are ignored — see the
|
||||
divergence list above. **Limitation:** this drop-in translation is currently
|
||||
**Vim-only**; on Neovim, configure via `setup()` / `g:nuwiki_wikis`.
|
||||
`links_space_char`, `list_margin`). `g:nuwiki_*` / `setup()` config always
|
||||
wins. Globals nuwiki doesn't model (e.g. `automatic_nested_syntaxes`) are
|
||||
ignored — see the divergence list above. On Neovim this means swapping the
|
||||
`vimwiki` plugin for nuwiki under lazy.nvim works with your existing
|
||||
`vim.g.vimwiki_list` untouched (call `require('nuwiki').setup()` with no args).
|
||||
- **Third-party plugin compatibility.** A shim at `autoload/vimwiki/vars.vim`
|
||||
exposes the subset of `vimwiki#vars#get_wikilocal` that plugins like
|
||||
vimwiki-sync and vim-zettel call (`path`, `ext`/`extension`, `syntax`,
|
||||
|
||||
Reference in New Issue
Block a user