feat(nvim): add mappings for refactors
This commit is contained in:
parent
903a36451d
commit
3d1135788c
|
@ -3,5 +3,16 @@ if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
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
|
-- TODO: add keymaps - https://github.com/ThePrimeagen/refactoring.nvim#configuration-for-refactoring-operations
|
||||||
refactoring.setup {}
|
refactoring.setup {}
|
||||||
|
|
||||||
|
local opts = { silent = true }
|
||||||
|
|
||||||
|
nmap { "<Leader>ri", "<Cmd>lua require 'refactoring'.refactor 'Inline Variable'<Cr>", opts }
|
||||||
|
|
||||||
|
vmap { "<Leader>re", "<Esc><Cmd>lua require 'refactoring'.refactor 'Extract Function'<Cr>", opts }
|
||||||
|
vmap { "<Leader>ri", "<Esc><Cmd>lua require 'refactoring'.refactor 'Inline Variable'<Cr>", opts }
|
||||||
|
vmap { "<Leader>rv", "<Esc><Cmd>lua require 'refactoring'.refactor 'Extract Variable'<Cr>", opts }
|
||||||
|
|
Loading…
Reference in a new issue