Skip Navigation

Making telescope.nvim find_files show hidden files by default - Following ThePrimeagen's guide

Hey guys, I'm following the tutorial above, and in his video he doesn't do anything specific to show hidden files, but it works for him. My .config/nvim/after/plugin/telescope.lua file looks like this: I've looked up solutions but they all use a different syntax, and none work for me. Any idea how I can make the find_files command also show hidden files by using this syntax? Thanks!

6

You're viewing a single thread.

6 comments
  • If you have fd installed, telescope uses it's settings including ignore files (including .ignore and .gitignore etc). So if have the default settings for fd to show hidden files, telescope will respect that.

    Otherwise, if you want to have hidden files only in telescope without changing the default behavior of fd , when using your key binding, change it as follows:

    vim.keymap.set("n", "<leader>ff",  function() builtin.find_files({hidden=true}) end, {})
    

    Edit: Change to keybind format Edit2: Wrap builtin in function call

    • Hey, I only just had the time to try this out. I edited it as you suggested, but I still get an error when I :so after writing the file. Also, I don't have any fd command, and I'm not aware of anything extra that I added to nvim called fd.

6 comments