nx.nvim
nx.nvim copied to clipboard
[Feature Request] keymap on loaded module
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.