You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
836 B
Lua

local M = {}
local opts = {
defaults = {
enable_highlighting = true,
inline_highlighting = true,
hl_groups = {
insertion = "DiffAdd",
deletion = "DiffDelete",
change = "DiffChange",
},
},
debug = true,
commands = {
Norm = { cmd = "norm" },
Reg = {
cmd = "norm",
-- This will transform ":5Reg a" into ":norm 5@a"
args = function(opts)
return (opts.count == -1 and "" or opts.count) .. "@" .. opts.args
end,
range = "",
},
}
}
function M.get_cmds()
local cmds = {}
for cmd, _ in pairs(opts.commands) do
table.insert(cmds, cmd)
end
return cmds
end
function M.setup()
require("live-command").setup(opts)
end
return M