Skip to content

Commit

Permalink
feat(keymaps): Get rename command from inc_rename configuration (#579)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aarondill committed Apr 16, 2023
1 parent 1defd5f commit a099b2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/lazyvim/plugins/lsp/keymaps.lua
Expand Up @@ -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",
Expand Down

0 comments on commit a099b2d

Please sign in to comment.