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
No known key found for this signature in database
GPG Key ID: 18D6730BC846AAC5
1 changed files with
1 additions and
2 deletions
-
lua/doom/core/functions/init.lua
|
@ -60,10 +60,9 @@ M.load_custom_settings = function(settings_tbl, scope) |
|
|
func_body() |
|
|
func_body() |
|
|
end |
|
|
end |
|
|
elseif scope == "mappings" then |
|
|
elseif scope == "mappings" then |
|
|
local opts = { silent = true } |
|
|
|
|
|
for _, map in ipairs(settings_tbl) do |
|
|
for _, map in ipairs(settings_tbl) do |
|
|
-- scope, lhs, rhs, options |
|
|
-- 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 |
|
|
end |
|
|
elseif scope == "variables" then |
|
|
elseif scope == "variables" then |
|
|
for var, val in pairs(settings_tbl) do |
|
|
for var, val in pairs(settings_tbl) do |
|
|