1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 03:14:55 +02:00

nvim: indent fixes and keymaps

This commit is contained in:
Henrik Hautakoski 2024-07-07 14:58:40 +02:00
parent 4102585363
commit 7883d02176
6 changed files with 75 additions and 60 deletions

View file

@ -3,5 +3,11 @@ return function(v, opts)
local lhs = table.remove(c, 1)
local rhs = table.remove(c, 1)
opts = vim.tbl_deep_extend("force", c, opts or {})
vim.keymap.set('n', lhs, rhs, opts)
local mode = 'n'
if opts.mode then
mode = opts.mode
opts.mode = nil
end
vim.keymap.set(mode, lhs, rhs, opts)
end