chore: improve fzf ignore files

This commit is contained in:
Mariano Z. 2025-03-09 22:49:53 -03:00
parent 936a65ae43
commit d75777ef85
Signed by: marianozunino
GPG key ID: 4C73BAD25156DACE
2 changed files with 15 additions and 1 deletions

View file

@ -23,6 +23,7 @@ return {
templ = { "templ" },
c = { "clang-format" },
cpp = { "clang-format" },
hcl = { "hcl" },
},
formatters = {
csharpier = {

View file

@ -41,11 +41,24 @@ M.config = function()
nmap("<leader>oc", fzf_lua.lsp_outgoing_calls, { desc = "Outgoing Calls" })
nmap("<leader>gf", fzf_lua.live_grep, { desc = "Find Live Grep" })
-- keys = {
local exclusions = {
"node_modules",
".git",
"dist",
"build",
"coverage",
}
local exclude_opts = ""
for _, item in ipairs(exclusions) do
exclude_opts = exclude_opts .. " --exclude " .. item
end
nmap("<leader>/", function()
fzf_lua.files({
cwd_prompt = false,
silent = true,
fd_opts = "--hidden --no-ignore --type f" .. exclude_opts,
})
end, { desc = "Find Files" })
nmap(";", fzf_lua.buffers, { desc = "Find Buffers" })