Large keymapping overhaul
This commit is contained in:
parent
11af8c9452
commit
9fb6438efa
9 changed files with 27 additions and 81 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue