diff --git a/lua/custom/fzf_lua.lua b/lua/custom/fzf_lua.lua index acd47c1..73c8166 100644 --- a/lua/custom/fzf_lua.lua +++ b/lua/custom/fzf_lua.lua @@ -190,3 +190,13 @@ keymap("n", "fdp", function() no_esc = true, }) end, { desc = "FZF: unresolved problems in current buffer" }) + +-- Exact search of text placed right after a ``` fence (code snippet first line) in cwd +keymap("n", "fcs", function() + fzf_lua.live_grep({ + prompt = 'Code snippetsāÆ ', + search = '(?<=```\\n)', + no_esc = true, + rg_opts = "--column --line-number --no-heading --color=always --smart-case -U --pcre2 -g '*.md'", + }) +end, { desc = "FZF: search first line of code blocks in cwd" })