Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(integrations): Optionally autoload keymaps from lazy.nvim plugin specs #382

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

mrjones2014
Copy link
Owner

@mrjones2014 mrjones2014 commented Jun 23, 2023

Resolves: #377

How to Test

  1. Setup legendary.nvim with require('legendary').setup({ lazy_nvim = { auto_register = true } })
  2. Set up a keymap through a lazy.nvim plugin spec like
{
  'folke/flash.nvim',
  keys = {
    {
      's',
      function()
        require('flash').jump()
      end,
      mode = { 'n', 'x', 'o' },
      desc = 'Jump forwards',
    },
    {
      'S',
      function()
        require('flash').jump({ search = { forward = false } })
      end,
      mode = { 'n', 'x', 'o' },
      desc = 'Jump backwards',
    },
  },
}
  1. The keymaps defined in the plugin spec should be loaded into legendary.nvim

Testing for Regressions

I have tested the following:

  • Triggering keymaps from legendary.nvim in all modes (normal, insert, visual)
  • Creating keymaps via legendary.nvim, then triggering via the keymap in all modes (normal, insert, visual)
  • Triggering commands from legendary.nvim in all modes (normal, insert, visual)
  • Creating commands via legendary.nvim, then running the command manually from the command line
  • augroup/autocmds created through legendary.nvim work correctly

@mrjones2014 mrjones2014 changed the title feat(integrations): Add lazy.nvim integration to auto-load keymaps de… feat(integrations): Optionally autoload keymaps from lazy.nvim plugin specs Jun 23, 2023
@mrjones2014 mrjones2014 merged commit 71baaaa into master Jun 23, 2023
1 of 4 checks passed
@mrjones2014 mrjones2014 deleted the mrj/377/lazy-nvim-integration branch June 23, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Parse keymaps off lazy.nvim plugin specs
1 participant