50 lines
1.5 KiB
Lua
50 lines
1.5 KiB
Lua
return {
|
|
"nvim-telescope/telescope.nvim",
|
|
event = "VeryLazy",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-telescope/telescope-project.nvim",
|
|
-- "nvim-telescope/telescope-ui-select.nvim",
|
|
},
|
|
keys = {
|
|
{"<C-Tab>", "<cmd>Telescope buffers<cr>", desc = "Buffers"},
|
|
{"<leader>f", "<cmd>Telescope find_files<cr>", desc = "Find files"},
|
|
{"<leader>h", "<cmd>Telescope help_tags<cr>", desc = "Help"},
|
|
{"<leader>p", "<cmd>Telescope project<cr>", desc = "Projects"},
|
|
{"<leader>r", "<cmd>Telescope oldfiles<cr>", desc = "Recent files"},
|
|
{"<leader>w", "<cmd>Telescope grep_string<cr>", desc = "Word"},
|
|
{"<leader>ds", "<cmd>Telescope lsp_document_symbols<cr>", desc = "Document symbols"},
|
|
{"<leader>ws", "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", desc = "Workspace symbols"},
|
|
},
|
|
config = function()
|
|
require("telescope").setup({
|
|
defaults = {
|
|
mappings = {
|
|
i = {
|
|
["<esc>"] = require("telescope.actions").close,
|
|
},
|
|
},
|
|
prompt_prefix = " ",
|
|
selection_caret = " ",
|
|
},
|
|
extensions = {
|
|
project = {
|
|
base_dirs = {
|
|
{ path = "~/projects", max_depth = 3 },
|
|
},
|
|
order_by = "desc",
|
|
sync_with_nvim_tree = true,
|
|
theme = "dropdown",
|
|
},
|
|
-- ["ui-select"] = {
|
|
-- require("telescope.themes").get_dropdown(),
|
|
-- },
|
|
},
|
|
})
|
|
|
|
require("telescope").load_extension("project")
|
|
require("telescope").load_extension("notify")
|
|
-- require("telescope").load_extension("ui-select")
|
|
end,
|
|
}
|