github saberzero1/motions 0.86.0

latest releases: 0.150.0, 0.149.0, 0.148.0...
one month ago

Fixed

  • Which-key displays inaccurate count of group subcommands in "all" mode — when whichKeyMode was set to "All partial keys" and the user pressed the leader key, the which-key popup showed wildly inflated (+N) group counts (e.g., (+418) instead of (+21)). The "All partial keys" code path (showCompletions()) queried vim.getCompletions() from the CM vim engine, which returns the entire defaultKeymap array — including built-in defaults, plugin-internal keymaps, and user-defined keymaps — instead of using only the leaderBindings registry (which contains only user-visible leader keymaps). The "Leader key only" mode (showLeaderBindings()) was unaffected because it already used leaderBindings directly. Fixed by adding an isLeaderScope branch in showCompletions() that mirrors showLeaderBindings() — building entries from this.leaderBindings filtered by the current prefix, with correct label/icon/color resolution and leader-style title formatting. Non-leader completions (g, z, d, etc.) continue using vim.getCompletions() as before. (#91)
    • Plugin: src/ui/which-key.ts (showCompletionsisLeaderScope branch, deferred getCompletions to non-leader else branch)
  • Several vim.opt and vimrc set options produce "unknown vim.opt option" warning — 12 plugin settings were documented but never registered in the Lua vim.opt proxy (KNOWN_SET_OPTIONS) or the vimrc :set pathway (vim.defineOption). Setting them via vim.opt.yankring = true or set yankring in vimrc logged a console warning and had no effect. Fixed by adding all 12 options to both registries. Options now work identically across Settings UI, vimrc, and Lua. (#90)
    • Added to both KNOWN_SET_OPTIONS and vim.defineOption: yankring, yankhighlightmode, yankhighlightduration, undotree, undofile, undotreemaxnodes, foldawarenavigation, foldpersistence, harpoon, dial
    • Added to KNOWN_SET_OPTIONS only (already had vim.defineOption): jumplist, jumplistsize
    • Plugin: src/vimrc/loader.ts (12 new KNOWN_SET_OPTIONS entries + setJumpListEnabled/setJumpListSize imports), src/vim/options.ts (10 new vim.defineOption calls + 2 new exported setters)

Tests

  • 1 e2e test in test/specs/lua-space-leader.e2e.ts: which-key group count in "all" mode with space leader stays bounded to actual leader bindings (not inflated by engine-internal keymaps)

Documentation

  • CHANGELOG.md
  • KNOWN_LIMITATIONS.md: Added which-key inflated group count fix; added vim.opt/vimrc option parity fix
  • docs/configuration/lua-config.md: Added 8 missing options to vim.opt table (harpoon, dial, jumplist, foldawarenavigation, foldpersistence, jumplistsize, yankhighlightduration, yankhighlightmode)
  • docs/configuration/vimrc.md: Added 6 missing options to vimrc tables (harpoon, dial, foldawarenavigation, foldpersistence, yankhighlightmode, yankhighlightduration)

Full Changelog: 0.85.0...0.86.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.