feat(keymaps): Get rename command from inc_rename configuration

Gets the rename command from the inc_rename module (when installed), rather than assuming the default `IncRename`, allowing the user to modify the inc_rename options without having to create a new keymap.
This commit is contained in:
Aaron Dill 2023-04-13 23:14:37 -05:00 committed by aarondill
parent 7ce1b1519a
commit dab082fd31

View file

@ -49,8 +49,8 @@ function M.get()
M._keys[#M._keys + 1] = {
"<leader>cr",
function()
require("inc_rename")
return ":IncRename " .. vim.fn.expand("<cword>")
local inc_rename = require("inc_rename")
return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("<cword>")
end,
expr = true,
desc = "Rename",