From 36d522bef7cbd5e120bd8de3881f9c80e9634a2b Mon Sep 17 00:00:00 2001 From: t0xa Date: Tue, 23 Dec 2025 09:27:33 +0300 Subject: [PATCH] Telescope: add hidden files search --- lua/custom/snippets/markdown.lua | 2 +- lua/custom/telescope.lua | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/custom/snippets/markdown.lua b/lua/custom/snippets/markdown.lua index 20b9a45..31f0dca 100644 --- a/lua/custom/snippets/markdown.lua +++ b/lua/custom/snippets/markdown.lua @@ -32,7 +32,7 @@ ls.add_snippets( ``` ]], { - c(1, { t "python", t "bash", t "swift", t "c" }), + c(1, { t "python", t "bash", t "", t "swift", t "c" }), i(2), } ) diff --git a/lua/custom/telescope.lua b/lua/custom/telescope.lua index 0ffbe5c..1006c9a 100644 --- a/lua/custom/telescope.lua +++ b/lua/custom/telescope.lua @@ -86,6 +86,14 @@ local function live_grep_in_quick_fix_list_files() }) end +-- Find files with hidden included +local function find_files_with_hidden_included() + require('telescope.builtin').find_files({ + hidden = true, + no_ignore = true, + }) +end + -- Create a Neovim command vim.api.nvim_create_user_command('TelescopeGrepGlob', live_grep_with_glob, {}) @@ -103,6 +111,7 @@ keymap.set('n', 'fcp', live_grep_in_current_dir, { desc = 'Live grep in keymap.set('n', 'ccp', copy_file_path_and_position, { desc = "Copy cursor position" }) keymap.set('n', 'ccd', copy_current_file_path, { desc = 'Live grep in current directory' }) keymap.set('n', 'fq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" }) +keymap.set('n', 'fa', find_files_with_hidden_included, { desc = "Find all files (hidden + no ignore)" }) -- Live grep in current file vim.keymap.set('n', 'fcf', function()