nx.nvim icon indicating copy to clipboard operation
nx.nvim copied to clipboard

[Feature Request] keymap on loaded module

Open alexmozaidze opened this issue 2 years ago • 0 comments

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.

alexmozaidze avatar Jun 18 '23 21:06 alexmozaidze