Telescope: add hidden files search
This commit is contained in:
parent
d82f0dd634
commit
36d522bef7
2 changed files with 10 additions and 1 deletions
|
|
@ -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),
|
i(2),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,14 @@ local function live_grep_in_quick_fix_list_files()
|
||||||
})
|
})
|
||||||
end
|
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
|
-- Create a Neovim command
|
||||||
vim.api.nvim_create_user_command('TelescopeGrepGlob', live_grep_with_glob, {})
|
vim.api.nvim_create_user_command('TelescopeGrepGlob', live_grep_with_glob, {})
|
||||||
|
|
||||||
|
|
@ -103,6 +111,7 @@ keymap.set('n', '<leader>fcp', live_grep_in_current_dir, { desc = 'Live grep in
|
||||||
keymap.set('n', '<leader>ccp', copy_file_path_and_position, { desc = "Copy cursor position" })
|
keymap.set('n', '<leader>ccp', copy_file_path_and_position, { desc = "Copy cursor position" })
|
||||||
keymap.set('n', '<leader>ccd', copy_current_file_path, { desc = 'Live grep in current directory' })
|
keymap.set('n', '<leader>ccd', copy_current_file_path, { desc = 'Live grep in current directory' })
|
||||||
keymap.set('n', '<leader>fq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" })
|
keymap.set('n', '<leader>fq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" })
|
||||||
|
keymap.set('n', '<leader>fa', find_files_with_hidden_included, { desc = "Find all files (hidden + no ignore)" })
|
||||||
|
|
||||||
-- Live grep in current file
|
-- Live grep in current file
|
||||||
vim.keymap.set('n', '<leader>fcf', function()
|
vim.keymap.set('n', '<leader>fcf', function()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue