return { 'refactoring.nvim', event = { 'BufReadPre', 'BufNewFile' }, keys = { { 'r', '', desc = '+refactor', mode = { 'n', 'v' } }, { 'rb', function() require('refactoring').refactor('Extract Block') end, desc = 'extract block', }, { 'rc', function() require('refactoring').debug.cleanup({}) end, desc = 'debug cleanup', }, { 'rf', function() require('refactoring').refactor('Extract Block To File') end, desc = 'extract block to file', }, { 'rf', function() require('refactoring').refactor('Extract Function') end, mode = 'v', desc = 'extract function', }, { 'rF', function() require('refactoring').refactor('Extract Function To File') end, mode = 'v', desc = 'extract function to file', }, { 'ri', function() require('refactoring').refactor('Inline Variable') end, mode = { 'n', 'v' }, desc = 'inline variable', }, { 'rp', function() require('refactoring').debug.print_var({ normal = true }) end, desc = 'debug print variable', }, { 'rp', function() require('refactoring').debug.print_var() end, mode = 'v', desc = 'debug print variable', }, { 'rP', function() require('refactoring').debug.printf({ below = false }) end, desc = 'debug print', }, { 'rs', function() require('fzf-lua').fzf_exec(require('refactoring').get_refactors(), { fzf_opts = {}, fzf_colors = true, actions = { ['default'] = function(selected) require('refactoring').refactor(selected[1]) end, }, }) end, mode = 'v', desc = 'refactor', }, { 'rx', function() require('refactoring').refactor('Extract Variable') end, mode = 'v', desc = 'extract variable', }, }, before = function() require('lz.n').trigger_load({ 'plenary.nvim', 'nvim-treesitter' }) end, after = function() require('refactoring').setup({ prompt_func_param_type = { go = false, java = false, cpp = false, c = false, h = false, hpp = false, cxx = false, }, prompt_func_return_type = { go = false, java = false, cpp = false, c = false, h = false, hpp = false, cxx = false, }, printf_statements = {}, print_var_statements = {}, show_success_message = false, }) end, }