local refactoring = require('refactoring') refactoring.setup({}) -- Use which-key to register the mapping explicitly local wk = require("which-key") wk.add({ { "r", group = "refactor" }, { mode = { "x" }, { "re", function() require('refactoring').select_refactor() end, desc = "Refactor Menu" }, { "rv", function() require('refactoring').refactor('Extract Variable') end, desc = "Extract Variable" }, { "rf", function() require('refactoring').refactor('Extract Function') end, desc = "Extract Function" }, { "ri", function() require('refactoring').refactor('Inline Variable') end, desc = "Inline Variable" }, }, })