37 lines
861 B
Lua
Raw Normal View History

2023-08-19 17:22:56 +00:00
return {
"nvim-telescope/telescope.nvim",
dependencies = {
2023-08-21 17:19:37 +00:00
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope-project.nvim",
2023-08-19 17:22:56 +00:00
},
2023-08-21 17:19:37 +00:00
keys = {
2024-03-04 23:40:49 +00:00
{"<C-Tab>", "<cmd>Telescope buffers<cr>", desc = "Buffers"},
2023-08-21 17:19:37 +00:00
{"<leader>f", "<cmd>Telescope find_files<cr>", desc = "Find files"},
{"<leader>p", "<cmd>Telescope project<cr>", desc = "Projects"},
2024-03-03 16:47:02 +00:00
{"<leader>r", "<cmd>Telescope oldfiles<cr>", desc = "Recent files"},
2023-08-21 17:19:37 +00:00
},
config = function()
require("telescope").setup({
2024-01-22 14:04:33 +00:00
defaults = {
mappings = {
i = {
["<esc>"] = require("telescope.actions").close,
},
},
2024-03-01 23:32:40 +00:00
prompt_prefix = " ",
selection_caret = "",
2024-01-22 14:04:33 +00:00
},
2023-08-21 17:19:37 +00:00
extensions = {
project = {
base_dirs = {
2024-01-21 16:14:47 +00:00
{ path = "~/projects", max_depth = 3 },
2023-08-21 17:19:37 +00:00
},
order_by = "desc",
sync_with_nvim_tree = true,
theme = "dropdown",
},
},
})
end,
2023-08-19 17:22:56 +00:00
}