From a099b2d3ab3ff3bafb075c101e2b2a48b44fe869 Mon Sep 17 00:00:00 2001 From: Aaron Dill <117116764+aarondill@users.noreply.github.com> Date: Sun, 16 Apr 2023 03:43:14 -0500 Subject: [PATCH] feat(keymaps): Get rename command from inc_rename configuration (#579) 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. --- lua/lazyvim/plugins/lsp/keymaps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 682ec340..37301b50 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -49,8 +49,8 @@ function M.get() M._keys[#M._keys + 1] = { "cr", function() - require("inc_rename") - return ":IncRename " .. vim.fn.expand("") + local inc_rename = require("inc_rename") + return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("") end, expr = true, desc = "Rename",