feat: add keymap for inserting previous line indentation

This commit is contained in:
2024-08-29 15:04:15 -04:00
parent ef011f2263
commit d143f03026
2 changed files with 16 additions and 15 deletions
+11
View File
@@ -295,6 +295,17 @@ M.iconpicker = {
}, },
} }
M.indentor = {
{ -- Indentor
"<C-i>",
function()
require("utils.indentor").insert_previous_line_indentation()
end,
"Insert Previous Line Indentation",
{ "i", "n" },
},
}
M.lazygit = { M.lazygit = {
{ -- LazyGit { -- LazyGit
"<leader>lg", "<leader>lg",
+5 -15
View File
@@ -41,20 +41,10 @@ function M.insert_previous_line_indentation()
end end
end end
-- Create a keymap to trigger the function using native mappings -- Create a keymap to trigger the function
-- vim.api.nvim_set_keymap( local data = require("data")
-- { "i", "n" }, for _, map in ipairs(data.keys.indentor) do
-- "<C-i>", data.func.add_keymap(map[1], map[2], map[3], map[4])
-- "<Cmd>lua require('indentor').insert_previous_line_indentation()<CR>", end
-- { noremap = true, silent = true }
-- )
-- Create a keymap to trigger the function using Rootiest utils
require("data").func.add_keymap(
"<C-i>",
M.insert_previous_line_indentation,
"Indent Line",
{ "i", "n" }
)
return M return M