nix-config/modules/nixvim/refactoring.nix
Oliver Davies 703bf836de
All checks were successful
/ check (push) Successful in 55s
Rename modules directory
2025-08-18 11:35:07 +01:00

54 lines
1.1 KiB
Nix

{ config, lib, ... }:
{
flake.modules.nixvim.custom = {
plugins.refactoring = {
enable = true;
enableTelescope = true;
};
keymaps = [
{
key = "<leader>ri";
action = "<cmd>Refactor inline_var<CR>";
mode = "n";
}
{
key = "<leader>re";
action = "<cmd>Refactor extract<CR>";
mode = "x";
}
{
key = "<leader>ri";
action = "<cmd>Refactor inline_var<CR>";
mode = "x";
}
{
key = "<leader>rv";
action = "<cmd>Refactor extract_var<CR>";
mode = "x";
}
];
# ++
# lib.optionals
# (
# config.flake.modules.nixvim.custom.plugins.refactoring.enable
# && config.flake.modules.nixvim.custom.plugins.refactoring.enableTelescope
# )
# [
# {
# mode = "n";
# key = "<leader>rR";
# action.__raw = ''
# function()
# require('telescope').extensions.refactoring.refactors()
# end
# '';
# options.silent = true;
# }
# ];
};
}