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