Large keymapping overhaul

This commit is contained in:
Martin Larsson 2025-05-30 13:57:11 +02:00
parent 11af8c9452
commit 9fb6438efa
9 changed files with 27 additions and 81 deletions

View file

@ -1,4 +1,3 @@
local utils = require("utils")
local M = {}
M.format_on_save = true
@ -21,16 +20,11 @@ function M.setup()
local user_commands = {
{ "FormatEnable", "lua require('format_handler').format_enable()" },
{ "FormatDisable", "lua require('format_handler').format_disable()" },
{ "Format", "lua require('format_handler').format(true)" },
}
for _, cmd in ipairs(user_commands) do
vim.api.nvim_command("command! " .. cmd[1] .. " " .. cmd[2])
end
utils.set_keymap_list({
{ "<leader>ff", function() M.format(true) end },
{ "<leader>fe", function() M.format_enable() end },
{ "<leader>fd", function() M.format_disable() end },
})
end
return M