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