Skip to content

Commit b49c214

Browse files
committed
fix: set keybinds for the appropriate buffer (fixes telescope issues)
1 parent 113c21b commit b49c214

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/neorg/modules/core/keybinds/module.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ local module = modules.create("core.keybinds")
1414
module.load = function()
1515
if module.config.public.default_keybinds then
1616
vim.api.nvim_create_autocmd("BufEnter", {
17-
callback = function()
17+
callback = function(ev)
1818
local is_norg = vim.bo.filetype == "norg"
1919

2020
local preset = module.private.presets[module.config.public.preset]
@@ -24,7 +24,7 @@ module.load = function()
2424
for mode, keybinds in pairs(data) do
2525
for _, keybind in ipairs(keybinds) do
2626
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 {})
2828
vim.keymap.set(mode, keybind[1], keybind[2], opts)
2929
end
3030
end

0 commit comments

Comments
 (0)