feat(nvim): add inc-rename.nvim

This commit is contained in:
Moritz Böhme 2023-08-12 16:46:45 +02:00
parent 20e9a91d91
commit 7d1ae8c1f4
Signed by: moritz
GPG key ID: 970C6E89EB0547A9
2 changed files with 21 additions and 1 deletions

View file

@ -135,6 +135,19 @@ with builtins;
plugin = neodev-nvim; plugin = neodev-nvim;
conf = readFile ./neodev-nvim.lua; conf = readFile ./neodev-nvim.lua;
} }
{
plugin = inc-rename-nvim;
conf = /* lua */ ''
require("inc_rename").setup {
input_buffer_type = "dressing",
}
'';
dependencies = [
{
plugin = dressing-nvim;
}
];
}
]; ];
} }
{ {

View file

@ -28,9 +28,16 @@ local on_attach_def = function(client, bufnr)
}, },
["<leader>"] = { ["<leader>"] = {
l = { l = {
name = "lsp",
d = { vim.diagnostic.open_float, "Open diagnostic window" }, d = { vim.diagnostic.open_float, "Open diagnostic window" },
c = { vim.lsp.buf.code_action, "Code action" }, c = { vim.lsp.buf.code_action, "Code action" },
r = { vim.lsp.buf.rename, "Rename" }, r = {
function()
return ":IncRename " .. vim.fn.expand("<cword>")
end,
"Rename",
expr = true,
},
f = { f = {
function() function()
vim.lsp.buf.format({ async = true }) vim.lsp.buf.format({ async = true })