From 09b0e66452f85a1bdc4c7050106df9012293fde2 Mon Sep 17 00:00:00 2001 From: Michel Date: Wed, 11 Sep 2024 14:34:25 +0200 Subject: [PATCH] feat(grug): search word under cursor --- lua/plugins/editor.lua | 16 ++++++++++++++++ lua/plugins/telescope.lua | 1 + 2 files changed, 17 insertions(+) diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index 213a452..f7f73c0 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -9,6 +9,22 @@ return { }, }, + { + "MagicDuck/grug-far.nvim", + keys = { + { + "sw", + function() + require('grug-far').open({ prefills = { + flags = '-w', + search = vim.fn.expand(""), + }}) + end, + desc = "Grug: word\\cursor", + }, + }, + }, + { "Darazaki/indent-o-matic", event = "LazyFile", diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 04ba7b4..6f02f7a 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -4,6 +4,7 @@ return { keys = { -- stylua: ignore + {"sw", false}, -- see grug-far { "fC", function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root .. "/LazyVim/lua/lazyvim" }) end,