feat: add keymap for inserting previous line indentation
This commit is contained in:
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user