More work, LSP is not working yet need to figure that out more
This commit is contained in:
parent
713d128018
commit
764b890c58
32 changed files with 290 additions and 441 deletions
24
lua/util.lua
Normal file
24
lua/util.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
local M = {};
|
||||
|
||||
function M.keymaps(mappings)
|
||||
for mode, maps in pairs(mappings) do
|
||||
for keymap, options in pairs(maps) do
|
||||
if options then
|
||||
local cmd = options
|
||||
local keymap_opts = {}
|
||||
if type(options) == "table" then
|
||||
cmd = options[1]
|
||||
keymap_opts = vim.tbl_deep_extend("force", keymap_opts, options)
|
||||
keymap_opts[1] = nil
|
||||
end
|
||||
|
||||
if mode and keymap and cmd and keymap_opts then
|
||||
vim.keymap.set(mode, keymap, cmd, keymap_opts)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue