From 8b38a13192b9786a1bf8e4ea4786bc81111c0b5a Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Sun, 12 Apr 2026 02:30:51 +0200 Subject: [PATCH] replace live-rename with rephrase --- nvim/plugin/live-rename.lua | 28 ---------------------------- nvim/plugin/rephrase.lua | 12 ++++++++---- 2 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 nvim/plugin/live-rename.lua diff --git a/nvim/plugin/live-rename.lua b/nvim/plugin/live-rename.lua deleted file mode 100644 index 12e6360..0000000 --- a/nvim/plugin/live-rename.lua +++ /dev/null @@ -1,28 +0,0 @@ -vim.schedule(function() - vim.pack.add({ "https://github.com/saecki/live-rename.nvim" }) - require("live-rename").setup({ - prepare_rename = true, - request_timeout = 1500, - show_other_ocurrences = true, - use_patterns = true, - scratch_register = "l", - keys = { - submit = { - { "n", "" }, - { "v", "" }, - { "i", "" }, - }, - cancel = { - { "n", "" }, - { "n", "q" }, - }, - }, - hl = { - current = "CurSearch", - others = "Search", - }, - }) - vim.keymap.set("n", "r", function() - require("live-rename").rename({ cursorpos = 0 }) - end) -end) diff --git a/nvim/plugin/rephrase.lua b/nvim/plugin/rephrase.lua index 072e3e1..7c513bf 100644 --- a/nvim/plugin/rephrase.lua +++ b/nvim/plugin/rephrase.lua @@ -1,4 +1,8 @@ -vim.opt.runtimepath:append("/Users/larssonmartin/dev/git/nvim-rephrase") -if pcall(require, "rephrase") then - require("rephrase").setup({}) -end +vim.api.nvim_create_autocmd("LspAttach", { + once = true, + callback = function() + vim.pack.add({ "https://github.com/LarssonMartin1998/nvim-rephrase" }) + require("rephrase").setup({}) + require("utils").set_keymap_list({ { "h", "Rephrase" } }) + end, +})