nvim: Add mapping for finding hidden files

While <leader>f searches files, now <leader><c-f> searches for hidden
files.
Simple addition but can be very useful if you work for example in
dotfolder directories or similar.

Now I just need to find a way to do the same for live_grep. The
functionality is there (live_grep can take the same `{hidden=true}`
argument as find_files) but terminal emulators don't distinguish between
<c-f> and <c-F> so there is no convenient mapping for it yet.
This commit is contained in:
Marty Oehme 2022-03-08 10:15:33 +01:00
parent 3c59ab0b61
commit ebf4274c5b
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -130,6 +130,9 @@ map.n.nore['<leader>S'] =
[[:lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())<cr>]]
-- fuzzy find files in cwd
map.n.nore['<leader>f'] = [[:lua require 'telescope.builtin'.find_files()<cr>]]
-- fuzzy find hidden files in cwd
map.n.nore['<leader><c-f>'] =
[[:lua require 'telescope.builtin'.find_files({hidden=true})<cr>]]
-- general full-text search in cwd with rg
map.n.nore['<leader>F'] = [[:lua require 'telescope.builtin'.live_grep()<cr>]]