local status, telescope = pcall(require, "telescope") if not status then return end local telescopeConfig = require("telescope.config") -- Clone the default Telescope configuration local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) } -- I want to search in hidden/dot files. table.insert(vimgrep_arguments, "--hidden") -- I don't want to search in the `.git` directory. table.insert(vimgrep_arguments, "--glob") table.insert(vimgrep_arguments, "!**/.git/*") -- Keyboard shortcuts vim.keymap.set("n", "", ":Telescope find_files", {}) vim.keymap.set("i", "", ":Telescope find_files", {}) telescope.setup({ defaults = { -- `hidden = true` is not supported in text grep commands. vimgrep_arguments = vimgrep_arguments, }, pickers = { find_files = { -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" }, }, }, })