Skip to content

Commit 591b883

Browse files
committed
feat(keybinds): don't try to forcefully override user keys
1 parent 721fd28 commit 591b883

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ module.public = {
121121
local function set_keys_for(data)
122122
for mode, keybinds in pairs(data) do
123123
for _, keybind in ipairs(keybinds) do
124-
if vim.fn.hasmapto(keybind[2], mode, false) == 0 then
124+
if vim.fn.hasmapto(keybind[2], mode, false) == 0 and vim.fn.mapcheck(keybind[1], mode, false):len() == 0 then
125125
local opts = vim.tbl_deep_extend("force", { buffer = buffer or true }, keybinds.opts or {})
126126
vim.keymap.set(mode, keybind[1], keybind[2], opts)
127127
end

0 commit comments

Comments
 (0)