diff --git a/nvim/after/plugin/ssr.lua b/nvim/after/plugin/ssr.lua new file mode 100644 index 0000000..691a8ee --- /dev/null +++ b/nvim/after/plugin/ssr.lua @@ -0,0 +1,24 @@ +-- +local status, ssr = pcall(require, "ssr") +if not status then + return +end + +local keymap = vim.keymap.set +local opts = { noremap = true, silent = true } + +ssr.setup({ + min_width = 50, + min_height = 5, + keymaps = { + close = "q", + next_match = "n", + prev_match = "N", + replace_all = "", + }, +}) + +-- Keymaps +keymap({ "n", "x" }, "sr", function() + require("ssr").open() +end, opts) diff --git a/nvim/lua/kogakure/plugins.lua b/nvim/lua/kogakure/plugins.lua index 4ef0b66..512f23a 100644 --- a/nvim/lua/kogakure/plugins.lua +++ b/nvim/lua/kogakure/plugins.lua @@ -168,6 +168,7 @@ return packer.startup(function(use) use("dbeniamine/cheat.sh-vim") -- Cheat.sh use("wakatime/vim-wakatime") -- Wakatime use("github/copilot.vim") -- GitHub Copilot + use("cshuaimin/ssr.nvim") -- Structural search and replace -- Custom Text Objects use("christoomey/vim-titlecase")