dotfiles/.config/nvim/lua/plugins/telescope.lua
histalek 874a55c2ad
nvim: Tweak telescope filepicker
Only ignore the .git/ directory. Show hidden and .gitignored files.
2023-01-09 14:04:53 +01:00

26 lines
635 B
Lua

local status_telescope, telescope = pcall(require, "telescope")
if not status_telescope then
return
end
local status_actions, actions = pcall(require, "telescope.actions")
if not status_actions then
return
end
telescope.setup({
defaults = {
mappings = {
i = {
["<C-k>"] = actions.move_selection_previous,
["<C-j>"] = actions.move_selection_next,
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
},
},
},
pickers = {
find_files = {
find_command = { "fd", "--type", "f", "--exclude", "**/.git/", "--strip-cwd-prefix", "--unrestricted" },
},
},
})