Files
LazyVim/lua/lazyvim/plugins/extras/editor/inc-rename.lua
Brian Di Palma c50018b791 feat(editor): added extra for inc-rename.nvim (#3432)
* feat(editor-extra): Add inc-rename

* fix: refactor and moved noice integration

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-06-04 09:51:36 +02:00

39 lines
821 B
Lua

return {
-- Rename with cmdpreview
recommended = true,
desc = "Incremental LSP renaming based on Neovim's command-preview feature",
{
"smjonas/inc-rename.nvim",
cmd = "IncRename",
opts = {},
},
-- LSP Keymaps
{
"neovim/nvim-lspconfig",
opts = function()
local keys = require("lazyvim.plugins.lsp.keymaps").get()
keys[#keys + 1] = {
"<leader>cr",
function()
local inc_rename = require("inc_rename")
return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("<cword>")
end,
expr = true,
desc = "Rename (inc-rename.nvim)",
has = "rename",
}
end,
},
--- Noice integration
{
"folke/noice.nvim",
optional = true,
opts = {
presets = { inc_rename = true },
},
},
}