mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix: refactor and moved noice integration
This commit is contained in:
parent
d65e74cb58
commit
41aa08f16b
2 changed files with 18 additions and 5 deletions
|
|
@ -1,14 +1,19 @@
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
-- Rename with cmdpreview
|
||||||
|
recommended = true,
|
||||||
|
desc = "Incremental LSP renaming based on Neovim's command-preview feature",
|
||||||
{
|
{
|
||||||
"smjonas/inc-rename.nvim",
|
"smjonas/inc-rename.nvim",
|
||||||
cmd = "IncRename",
|
cmd = "IncRename",
|
||||||
config = true,
|
opts = {},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- LSP Keymaps
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
init = function()
|
opts = function()
|
||||||
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
|
|
||||||
keys[#keys + 1] = {
|
keys[#keys + 1] = {
|
||||||
"<leader>cr",
|
"<leader>cr",
|
||||||
function()
|
function()
|
||||||
|
|
@ -16,9 +21,18 @@ return {
|
||||||
return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("<cword>")
|
return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("<cword>")
|
||||||
end,
|
end,
|
||||||
expr = true,
|
expr = true,
|
||||||
desc = "Rename",
|
desc = "Rename (inc-rename.nvim)",
|
||||||
has = "rename",
|
has = "rename",
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
--- Noice integration
|
||||||
|
{
|
||||||
|
"folke/noice.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
presets = { inc_rename = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,6 @@ return {
|
||||||
bottom_search = true,
|
bottom_search = true,
|
||||||
command_palette = true,
|
command_palette = true,
|
||||||
long_message_to_split = true,
|
long_message_to_split = true,
|
||||||
inc_rename = true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue