File tree 1 file changed +2
-2
lines changed
lua/neorg/modules/core/keybinds
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ local module = modules.create("core.keybinds")
14
14
module .load = function ()
15
15
if module .config .public .default_keybinds then
16
16
vim .api .nvim_create_autocmd (" BufEnter" , {
17
- callback = function ()
17
+ callback = function (ev )
18
18
local is_norg = vim .bo .filetype == " norg"
19
19
20
20
local preset = module .private .presets [module .config .public .preset ]
@@ -24,7 +24,7 @@ module.load = function()
24
24
for mode , keybinds in pairs (data ) do
25
25
for _ , keybind in ipairs (keybinds ) do
26
26
if vim .fn .hasmapto (keybind [2 ], mode , false ) == 0 then
27
- local opts = vim .tbl_deep_extend (" force" , { buffer = true }, keybinds .opts or {})
27
+ local opts = vim .tbl_deep_extend (" force" , { buffer = ev . buf }, keybinds .opts or {})
28
28
vim .keymap .set (mode , keybind [1 ], keybind [2 ], opts )
29
29
end
30
30
end
You can’t perform that action at this time.
0 commit comments