diff --git a/homeConfigurations/profiles/common_neovim.nix b/homeConfigurations/profiles/common_neovim.nix index 1f4b33b..638fab9 100644 --- a/homeConfigurations/profiles/common_neovim.nix +++ b/homeConfigurations/profiles/common_neovim.nix @@ -1075,6 +1075,8 @@ local actions_layout = require("telescope.actions.layout") require('telescope').setup { defaults = { + -- Exclude .git folder from all pickers (find_files, live_grep, etc.) + file_ignore_patterns = { "^%.git/", "/%.git/" }, mappings = { i = { -- Mapping to quit in insert mode @@ -1097,6 +1099,28 @@ filesize_limit = 0.3, -- in MB }, }, + pickers = { + find_files = { + -- Show hidden files like .github, .gitignore, etc. + hidden = true, + -- Still respect .gitignore (don't show .git folder contents) + no_ignore = false, + }, + live_grep = { + -- Search in hidden files/folders like .github + -- But exclude .git folder (too noisy) + additional_args = function() + return { "--hidden", "--glob", "!.git/" } + end, + }, + grep_string = { + -- Search in hidden files/folders + -- But exclude .git folder (too noisy) + additional_args = function() + return { "--hidden", "--glob", "!.git/" } + end, + }, + }, extensions = { fzf = { fuzzy = true, -- false will only do exact matching @@ -1117,10 +1141,11 @@ { "f", group = "Files" }, { "fF", "Telescope file_browser", desc = "File browser" }, - { "ff", "Telescope find_files", desc = "Find File" }, + { "ff", "Telescope find_files", desc = "Find File (incl. hidden)" }, { "fn", "enew", desc = "New File" }, { "fr", "Telescope oldfiles", desc = "Open Recent File" }, - { "fs", "Telescope live_grep", desc = "Live grep" }, + { "fs", "Telescope live_grep", desc = "Live grep (incl. hidden)" }, + { "fk", "Telescope keymaps", desc = "Search Keymaps" }, -- TODO: replace with octo --{ "gH", group = "GitHub" },