From 41aa08f16bce9a1489c5d14091e2102304dde711 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 4 Jun 2024 09:49:35 +0200 Subject: [PATCH] fix: refactor and moved noice integration --- .../plugins/extras/editor/inc-rename.lua | 22 +++++++++++++++---- lua/lazyvim/plugins/ui.lua | 1 - 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/inc-rename.lua b/lua/lazyvim/plugins/extras/editor/inc-rename.lua index a8d39bf5..a7c65243 100644 --- a/lua/lazyvim/plugins/extras/editor/inc-rename.lua +++ b/lua/lazyvim/plugins/extras/editor/inc-rename.lua @@ -1,14 +1,19 @@ return { + + -- Rename with cmdpreview + recommended = true, + desc = "Incremental LSP renaming based on Neovim's command-preview feature", { "smjonas/inc-rename.nvim", cmd = "IncRename", - config = true, + opts = {}, }, + + -- LSP Keymaps { "neovim/nvim-lspconfig", - init = function() + opts = function() local keys = require("lazyvim.plugins.lsp.keymaps").get() - keys[#keys + 1] = { "cr", function() @@ -16,9 +21,18 @@ return { return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("") end, expr = true, - desc = "Rename", + desc = "Rename (inc-rename.nvim)", has = "rename", } end, }, + + --- Noice integration + { + "folke/noice.nvim", + optional = true, + opts = { + presets = { inc_rename = true }, + }, + }, } diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index e46faf51..18aa5200 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -299,7 +299,6 @@ return { bottom_search = true, command_palette = true, long_message_to_split = true, - inc_rename = true, }, }, -- stylua: ignore