Skip to content

Commit

Permalink
feat(keybinds): don't try to forcefully override user keys
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Jul 15, 2024
1 parent 721fd28 commit 591b883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neorg/modules/core/keybinds/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ module.public = {
local function set_keys_for(data)
for mode, keybinds in pairs(data) do
for _, keybind in ipairs(keybinds) do
if vim.fn.hasmapto(keybind[2], mode, false) == 0 then
if vim.fn.hasmapto(keybind[2], mode, false) == 0 and vim.fn.mapcheck(keybind[1], mode, false):len() == 0 then
local opts = vim.tbl_deep_extend("force", { buffer = buffer or true }, keybinds.opts or {})
vim.keymap.set(mode, keybind[1], keybind[2], opts)
end
Expand Down

0 comments on commit 591b883

Please sign in to comment.