From d75777ef85eb6921ccaaa7e96b95a6c55fdc197c Mon Sep 17 00:00:00 2001 From: "Mariano Z." Date: Sun, 9 Mar 2025 22:49:53 -0300 Subject: [PATCH] chore: improve fzf ignore files --- lua/plugins/format.lua | 1 + lua/plugins/fzf.lua | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lua/plugins/format.lua b/lua/plugins/format.lua index c4d0099..db78f7b 100644 --- a/lua/plugins/format.lua +++ b/lua/plugins/format.lua @@ -23,6 +23,7 @@ return { templ = { "templ" }, c = { "clang-format" }, cpp = { "clang-format" }, + hcl = { "hcl" }, }, formatters = { csharpier = { diff --git a/lua/plugins/fzf.lua b/lua/plugins/fzf.lua index 7676bfc..9bbe32a 100644 --- a/lua/plugins/fzf.lua +++ b/lua/plugins/fzf.lua @@ -41,11 +41,24 @@ M.config = function() nmap("oc", fzf_lua.lsp_outgoing_calls, { desc = "Outgoing Calls" }) nmap("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("/", 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" })