-- ============================================================================ -- GRUG-FAR: Search and replace -- ============================================================================ -- Powerful find and replace plugin with live preview and regex support. -- Provides project-wide search/replace with ripgrep backend. -- Keymaps: sr for search, sR for current word search. -- ============================================================================ return { "MagicDuck/grug-far.nvim", cmd = "GrugFar", keys = { { "sr", "GrugFar", desc = "Search and Replace" }, { "sR", function() require("grug-far").grug_far({ prefills = { search = vim.fn.expand("") } }) end, desc = "Search current word", }, { "sR", function() require("grug-far").with_visual_selection() end, mode = "v", desc = "Search selection", }, }, opts = { headerMaxWidth = 80, icons = { enabled = true, actionEntryBullet = " ", searchInput = " ", replaceInput = " ", filesFilterInput = " ", flagsInput = "󰮚 ", resultsStatusReady = "󱩊 ", resultsStatusError = " ", resultsStatusSuccess = "󰗡 ", resultsActionMessage = " ", resultsChangeIndicator = "│", historyTitle = " ", }, startInInsertMode = false, windowCreationCommand = "vsplit", transitionDuration = 80, keymaps = { replace = { n = "r" }, qflist = { n = "q" }, syncLocations = { n = "s" }, syncLine = { n = "l" }, close = { n = "q" }, historyOpen = { n = "t" }, historyAdd = { n = "a" }, refresh = { n = "f" }, gotoLocation = { n = "" }, pickHistoryEntry = { n = "" }, abort = { n = "b" }, }, }, }