fix: grugfar

This commit is contained in:
pika 2025-03-30 12:32:55 +02:00
parent dfdfeea306
commit a71d4de2c1

View file

@ -7,11 +7,15 @@
---@type LazySpec
return {
-- disable plugins
-- ╭─────────────────╮
-- │ disable plugins │
-- ╰─────────────────╯
-- disable neo-tree
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
-- override plugin settings
-- ╭──────────────────────────╮
-- │ override plugin settings │
-- ╰──────────────────────────╯
"andweeb/presence.nvim",
{
"ray-x/lsp_signature.nvim",
@ -44,10 +48,6 @@ return {
-- },
-- },
-- You can disable default plugins as follows:
{ "max397574/better-escape.nvim", enabled = true },
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
{
"L3MON4D3/LuaSnip",
config = function(plugin, opts)
@ -90,12 +90,14 @@ return {
end,
},
-- set new/missing plugins
-- ╭─────────────────────────╮
-- │ set new/missing plugins │
-- ╰─────────────────────────╯
"lambdalisue/vim-suda",
"folke/lsp-colors.nvim",
"dstein64/nvim-scrollview",
-- vim maximizer
-- ─< vim maximizer >───────────────────────────────────────────────────────────────────
{
"szw/vim-maximizer",
keys = {
@ -103,7 +105,7 @@ return {
},
},
-- snippets creation and management with scissors
-- ─< snippets creation and management with scissors >──────────────────────────────────
{
{
"chrisgrieser/nvim-scissors",
@ -118,9 +120,11 @@ return {
vim.keymap.set("v", "<leader>sa", "<CMD>:ScissorsAddNewSnippet<cr>"),
},
-- mini plugins
-- ╭──────────────╮
-- │ mini plugins │
-- ╰──────────────╯
{
-- mini-ai for a and i selections or other --> vin" for visual in next ""
-- ─< mini-ai for a and i selections or other --> vin" for visual in next "" >──────────
{
"echasnovski/mini.ai",
version = "false",
@ -301,22 +305,23 @@ return {
opts = { headerMaxWidth = 80 },
cmd = "GrugFar",
-- ────────────────────────────────────< keybindings >─────────────────────────────────
keys = {
{
"<leader>sr",
function()
local grug = require "grug-far"
local ext = vim.bo.buftype == "" and vim.fn.expand "%:e"
grug.grug_far {
transient = true,
prefills = {
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
},
}
end,
mode = { "n", "v" },
desc = "Search and Replace",
},
},
-- keys = {
-- {
-- "<leader>sr",
-- function()
-- local grug = require "grug-far"
-- local ext = vim.bo.buftype == "" and vim.fn.expand "%:e"
-- grug.grug_far {
-- transient = true,
-- prefills = {
-- filesFilter = ext and ext ~= "" and "*." .. ext or nil,
-- },
-- }
-- end,
-- mode = { "n", "v" },
-- desc = "Search and Replace",
-- },
-- },
vim.keymap.set("n", "<leader>sr", "<CMD>GrugFar<CR>"),
},
}