From 194be91a03f3cd4348536a9f68c0a040eb8d2a3f Mon Sep 17 00:00:00 2001 From: Asep Komarudin <68836805+pojokcodeid@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:43:52 +0700 Subject: [PATCH] Updated 7. Example Custom Plugins (markdown) --- 7.-Example-Custom-Plugins.md | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/7.-Example-Custom-Plugins.md b/7.-Example-Custom-Plugins.md index 2f59eb1..5302f9e 100644 --- a/7.-Example-Custom-Plugins.md +++ b/7.-Example-Custom-Plugins.md @@ -2775,4 +2775,47 @@ return { require("telescope").load_extension "file_browser" end, } +``` +#Refactoring +```lua +return { + -- Incremental rename + { + "smjonas/inc-rename.nvim", + cmd = "IncRename", + keys = { + { + "un", + function() + return ":IncRename " .. vim.fn.expand "" + end, + desc = "Incremental rename", + mode = "n", + noremap = true, + expr = true, + }, + }, + config = true, + }, + + -- Refactoring tool + { + "ThePrimeagen/refactoring.nvim", + keys = { + { + "r", + function() + require("refactoring").select_refactor { + show_success_message = true, + } + end, + mode = "v", + noremap = true, + silent = true, + expr = false, + }, + }, + opts = {}, + }, +} ``` \ No newline at end of file