github saberzero1/motions 0.37.0

latest releases: 1.4.0, 1.3.1, 1.3.0...
3 months ago

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.nvim wk.add() syntax (#27)
    • vim.obsidian.whichkey.add({ { "<leader>f", group = "Find" }, { "<leader>w", desc = "Save" } }) — each entry uses group for prefix labels or desc for individual binding labels
    • Per-entry context field: "editor" (default) or "global" for non-editor which-key overlay
    • mode field accepted but reserved for future mode-scoped label support
    • Entries without a key string or without group/desc are 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_len type)

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.vimrc and .obsidian.init.lua files 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-error classes)

Documentation

  • docs/configuration/vimrc.md: file location section rewritten with full fallback chain table
  • docs/configuration/lua-config.md: file location section rewritten with full fallback chain table; added vim.obsidian.whichkey.add() to API summary table and Obsidian namespace section with wk.add() example
  • docs/configuration/settings.md: custom path setting descriptions updated with fallback chain lists
  • docs/configuration/which-key.md: added "Batch labels (add())" section with Neovim-style wk.add() syntax, local wk shorthand tip, and reserved mode field callout
  • docs/guides/migrating-from-vimrc-support.md: custom vimrc path section updated with fallback chain
  • KNOWN_LIMITATIONS.md: updated supported Lua APIs list to include vim.obsidian.whichkey.add()

Full Changelog: 0.36.0...0.37.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.