FzfLua: Add shortcut for finding snippets
This commit is contained in:
parent
589cab3c11
commit
c54b4be291
1 changed files with 10 additions and 0 deletions
|
|
@ -190,3 +190,13 @@ keymap("n", "<leader>fdp", function()
|
||||||
no_esc = true,
|
no_esc = true,
|
||||||
})
|
})
|
||||||
end, { desc = "FZF: unresolved problems in current buffer" })
|
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", "<leader>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" })
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue