What's the best way to "load" new mappings? #1401
Answered
by
amirhhashemi
amirhhashemi
asked this question in
Q&A
-
I know how to add new mappings but how should I load them? let's say I have a new plugin: ["numToStr/Navigator.nvim"] = {
opt = true,
setup = function()
require("core.lazy_load").on_file_open "Navigator.nvim"
end,
config = function()
require("Navigator").setup({
disable_on_zoom = true
})
end,
}, And I add the mappings for this plugin to my custom mappings table: M.navigator = {
n = {
["<C-h>"] = {
"<cmd> NavigatorLeft <CR>",
},
["<C-l>"] = {
'<cmd> NavigatorRight <CR>',
},
["<C-j>"] = {
'<cmd> NavigatorDown <CR>',
},
["<C-k>"] = {
'<cmd> NavigatorUp <CR>',
},
}
} When and how should I load these? is the setup function a good place to do that? |
Beta Was this translation helpful? Give feedback.
Answered by
amirhhashemi
Jul 29, 2022
Replies: 1 comment
-
Ok, it just automatically loads :) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
amirhhashemi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, it just automatically loads :)