From 4d347086c12a2890e9d624b536fa7c3d1267592d Mon Sep 17 00:00:00 2001 From: kalmenn Date: Fri, 10 Oct 2025 23:43:23 +0200 Subject: [PATCH] feat(telescope): Make the find_files picker ignore some bulky directories (like .git and node_modules) --- lua/plugins/telescope.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 6927120..bb45580 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -10,8 +10,10 @@ return { }, lazy = false, keys = { + { "t", "Telescope", desc = "Open telescope" }, { "f", "Telescope find_files", desc = "Fuzzy find files with Telescope" }, - { "", "Telescope find_files", desc = "Fuzzy find files with Telescope" }, + { "", "Telescope find_files", desc = "Fuzzy find files with Telescope" }, + { "g", "Telescope git_files", desc = "Fuzzy find files included in git with Telescope" }, { "b", "Telescope buffers", desc = "Fuzzy find open buffers with Telescope" }, { "s", @@ -23,6 +25,11 @@ return { pickers = { find_files = { find_command = { "rg", "--files", "--hidden", "--no-ignore-vcs" }, + + file_ignore_patterns = { + "node_modules/", + ".git/", + }, }, }, },