mirror of
https://github.com/marianozunino/nvim.git
synced 2025-06-28 10:33:49 -03:00
chore: improve fzf ignore files
This commit is contained in:
parent
936a65ae43
commit
d75777ef85
2 changed files with 15 additions and 1 deletions
|
@ -23,6 +23,7 @@ return {
|
||||||
templ = { "templ" },
|
templ = { "templ" },
|
||||||
c = { "clang-format" },
|
c = { "clang-format" },
|
||||||
cpp = { "clang-format" },
|
cpp = { "clang-format" },
|
||||||
|
hcl = { "hcl" },
|
||||||
},
|
},
|
||||||
formatters = {
|
formatters = {
|
||||||
csharpier = {
|
csharpier = {
|
||||||
|
|
|
@ -41,11 +41,24 @@ M.config = function()
|
||||||
nmap("<leader>oc", fzf_lua.lsp_outgoing_calls, { desc = "Outgoing Calls" })
|
nmap("<leader>oc", fzf_lua.lsp_outgoing_calls, { desc = "Outgoing Calls" })
|
||||||
nmap("<leader>gf", fzf_lua.live_grep, { desc = "Find Live Grep" })
|
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()
|
nmap("<leader>/", function()
|
||||||
fzf_lua.files({
|
fzf_lua.files({
|
||||||
cwd_prompt = false,
|
cwd_prompt = false,
|
||||||
silent = true,
|
silent = true,
|
||||||
|
fd_opts = "--hidden --no-ignore --type f" .. exclude_opts,
|
||||||
})
|
})
|
||||||
end, { desc = "Find Files" })
|
end, { desc = "Find Files" })
|
||||||
nmap(";", fzf_lua.buffers, { desc = "Find Buffers" })
|
nmap(";", fzf_lua.buffers, { desc = "Find Buffers" })
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue