Added
vim.obsidian.whichkey.add()— batch which-key label configuration — define multiple group and command labels in a single call, similar to Neovim's which-key.nvimwk.add()syntax (#27)vim.obsidian.whichkey.add({ { "<leader>f", group = "Find" }, { "<leader>w", desc = "Save" } })— each entry usesgroupfor prefix labels ordescfor individual binding labels- Per-entry
contextfield:"editor"(default) or"global"for non-editor which-key overlay modefield accepted but reserved for future mode-scoped label support- Entries without a key string or without
group/descare silently skipped - Shorthand:
local wk = vim.obsidian.whichkey; wk.add({ ... })for Neovim-familiar syntax - Plugin:
src/lua/api.ts(vim.obsidian.whichkey.add),src/lua/types.d.ts(luaL_lentype)
Changed
- Config file fallback chains — vimrc and Lua config files are now resolved via a fallback chain instead of a single hardcoded path. The plugin searches the vault root for the first matching file. Custom path overrides still take priority.
- Vimrc chain (8 candidates):
vimrc,.vimrc,init.vim,.init.vim,obsidian.vimrc,obsidian.vim,.obsidian.vimrc,.obsidian.vim - Lua chain (5 candidates):
init.lua,.init.lua,obsidian.init.lua,.obsidian.init.lua,obsidian.lua - Non-dotfile names (
vimrc,init.lua) are preferred — Obsidian Sync skips dotfiles, and the.obsidian.*naming relied on a linter workaround - Settings UI now shows "Currently using: {path}" (resolved path) or "File not found" for invalid custom paths
- Settings descriptions list the full fallback chain
- Backward compatible: existing
.obsidian.vimrcand.obsidian.init.luafiles still work (they appear later in the chain) - Plugin:
src/vimrc/loader.ts(resolveVimrcPath,VIMRC_FALLBACK_PATHS),src/lua/loader.ts(resolveLuaConfigPath,LUA_FALLBACK_PATHS),src/settings.ts(async path resolution display),styles.css(.vim-motions-config-path-active/.vim-motions-config-path-errorclasses)
- Vimrc chain (8 candidates):
Documentation
docs/configuration/vimrc.md: file location section rewritten with full fallback chain tabledocs/configuration/lua-config.md: file location section rewritten with full fallback chain table; addedvim.obsidian.whichkey.add()to API summary table and Obsidian namespace section withwk.add()exampledocs/configuration/settings.md: custom path setting descriptions updated with fallback chain listsdocs/configuration/which-key.md: added "Batch labels (add())" section with Neovim-stylewk.add()syntax,local wkshorthand tip, and reservedmodefield calloutdocs/guides/migrating-from-vimrc-support.md: custom vimrc path section updated with fallback chainKNOWN_LIMITATIONS.md: updated supported Lua APIs list to includevim.obsidian.whichkey.add()
Full Changelog: 0.36.0...0.37.0