From 832d2c6ca29bc0974bae1524506e3224bd25adc8 Mon Sep 17 00:00:00 2001 From: SL1900 Date: Mon, 21 Jul 2025 20:26:03 +0900 Subject: [PATCH] Added gd keymap to grep search word under cursor (mainly for searching types from lsp hover) --- remap.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/remap.lua b/remap.lua index 0fb1481..8e5c7e4 100644 --- a/remap.lua +++ b/remap.lua @@ -45,6 +45,17 @@ if builtin then end, { desc = "[S]earch [N]eovim files" } ) + + vim.api.nvim_create_autocmd("FileType", { + pattern = {"markdown"}, + callback = function () + vim.schedule(function () + vim.keymap.set("n", "gd", function () + require("telescope.builtin").grep_string({search=vim.call("expand", "")}) + end, { desc = "Grep search word under cursor"}) + end) + end + }) end --LSP