local status_ok, refactoring = pcall(require, "refactoring") if not status_ok then return end local nmap = require("opdavies.keymap").nmap local vmap = require("opdavies.keymap").vmap -- TODO: add keymaps - https://github.com/ThePrimeagen/refactoring.nvim#configuration-for-refactoring-operations refactoring.setup {} local opts = { silent = true } nmap { "ri", "lua require 'refactoring'.refactor 'Inline Variable'", opts } vmap { "re", "lua require 'refactoring'.refactor 'Extract Function'", opts } vmap { "ri", "lua require 'refactoring'.refactor 'Inline Variable'", opts } vmap { "rv", "lua require 'refactoring'.refactor 'Extract Variable'", opts }