Browse Source

refact: don't use `utils.map` for custom mappings to avoid errors with `nvim-mapper`

- Allow the user to create his custom mappings with his custom options too
my-config
NTBBloodbath 3 years ago
parent
commit
0be3809fe3
No known key found for this signature in database GPG Key ID: 18D6730BC846AAC5
  1. 3
      lua/doom/core/functions/init.lua

3
lua/doom/core/functions/init.lua

@ -60,10 +60,9 @@ M.load_custom_settings = function(settings_tbl, scope)
func_body()
end
elseif scope == "mappings" then
local opts = { silent = true }
for _, map in ipairs(settings_tbl) do
-- scope, lhs, rhs, options
utils.map(map[1], map[2], map[3], opts)
vim.api.nvim_set_keymap(map[1], map[2], map[3], map[4] and map[4] or {})
end
elseif scope == "variables" then
for var, val in pairs(settings_tbl) do

Loading…
Cancel
Save