mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
49 lines
942 B
Lua
49 lines
942 B
Lua
|
local M = {}
|
||
|
if pcode.refactoring then
|
||
|
M = {
|
||
|
-- Incremental rename
|
||
|
{
|
||
|
"smjonas/inc-rename.nvim",
|
||
|
cmd = "IncRename",
|
||
|
-- stylua: ignore
|
||
|
keys = {
|
||
|
{"<leader>u","",desc=" Edit"},
|
||
|
{
|
||
|
"<leader>un",
|
||
|
function()
|
||
|
return ":IncRename " .. vim.fn.expand("<cword>")
|
||
|
end,
|
||
|
desc = "Incremental rename",
|
||
|
mode = "n",
|
||
|
noremap = true,
|
||
|
expr = true,
|
||
|
},
|
||
|
},
|
||
|
config = true,
|
||
|
},
|
||
|
|
||
|
-- Refactoring tool
|
||
|
{
|
||
|
"ThePrimeagen/refactoring.nvim",
|
||
|
keys = {
|
||
|
{
|
||
|
"<leader>r",
|
||
|
function()
|
||
|
require("refactoring").select_refactor({
|
||
|
show_success_message = true,
|
||
|
})
|
||
|
end,
|
||
|
mode = "v",
|
||
|
noremap = true,
|
||
|
silent = true,
|
||
|
expr = false,
|
||
|
desc = " Refactoring",
|
||
|
},
|
||
|
},
|
||
|
opts = {},
|
||
|
},
|
||
|
}
|
||
|
end
|
||
|
|
||
|
return M
|