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

[Feature Request] keymap on loaded module #6

Open
alexmozaidze opened this issue Jun 18, 2023 · 0 comments
Open

[Feature Request] keymap on loaded module #6

alexmozaidze opened this issue Jun 18, 2023 · 0 comments

Comments

@alexmozaidze
Copy link

alexmozaidze commented Jun 18, 2023

I would like to see an option that would check if a module is loaded or not to determine on wether to define the keymap.

Reason

Less repetitiveness. I have cases where I disable many of the plugins for faster startup, thus my keymaps.lua is populated with a snippet similar to the following:

if package.loaded["confirm-quit"] then
  map {
    { "<leader>qq", function() require "confirm-quit".confirm_quit { force = true } end },
  }
end

It is possible to move all of the plugin keymaps into the plugins.lua, but it is already very big, + I like my configs modularized.

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

No branches or pull requests

1 participant