mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 00:49:01 +02:00
add: refactoring config
This commit is contained in:
parent
ec3ec5ea1e
commit
e16678fc29
3 changed files with 51 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
"dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "700c4a25caacbb4648c9a27972c2fe203948e0c2" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "535b508c0cb14d00c1836ad901b3c531cb1152bb" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "fafe1f7c640aed75e70a10e6649612cd96f39149" },
|
||||
"lsp-progress.nvim": { "branch": "main", "commit": "55a04895ea20c365b670051a3128265d43bdfa3d" },
|
||||
|
@ -49,6 +50,7 @@
|
|||
"playground": { "branch": "master", "commit": "bcfab84f98a33f2ad34dda6c842046dca70aabf6" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "12b1a1e095d968887a17ef791c2edb78d7595d46" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "d2786877c91aa409c824f27b4ce8a9f560dda60a" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "66fda3a601a5b4c679656f15eb6ddd613c8d3216" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "f12b15e1b3a33524eb06a1ae7bc852fb1fd92197" },
|
||||
"tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "f3f136fd82eded0bd1e1870cf7dfab7e8c36801e" },
|
||||
|
|
|
@ -140,3 +140,4 @@ pcode.database = false
|
|||
pcode.jest = true
|
||||
pcode.jest_command = "npm test -- "
|
||||
pcode.jest_config = "jest.config.mjs"
|
||||
pcode.refactoring = false
|
||||
|
|
48
lua/plugins/refactoring.lua
Normal file
48
lua/plugins/refactoring.lua
Normal file
|
@ -0,0 +1,48 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue