2023-02-10 21:20:55 -08:00
|
|
|
return {
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
branch = "0.1.x",
|
|
|
|
dependencies = {
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
2023-02-28 18:19:20 -08:00
|
|
|
"debugloop/telescope-undo.nvim",
|
2024-06-02 11:16:46 -07:00
|
|
|
"nvim-telescope/telescope-ui-select.nvim",
|
2024-09-02 08:41:33 -07:00
|
|
|
"AckslD/nvim-neoclip.lua",
|
2023-02-10 21:20:55 -08:00
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
require("telescope").setup({
|
|
|
|
defaults = {
|
|
|
|
mappings = {
|
|
|
|
i = {
|
|
|
|
["<C-u>"] = false,
|
|
|
|
["<C-d>"] = false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Enable telescope fzf native, if installed
|
|
|
|
pcall(require("telescope").load_extension, "fzf")
|
|
|
|
pcall(require("telescope").load_extension, "scaladex")
|
2024-06-02 11:16:46 -07:00
|
|
|
pcall(require("telescope").load_extension, "ui-select")
|
2023-02-28 17:59:05 -08:00
|
|
|
pcall(require("telescope").load_extension, "undo")
|
2024-09-02 08:57:41 -07:00
|
|
|
pcall(require("telescope").load_extension, "neoclip")
|
2023-02-10 21:20:55 -08:00
|
|
|
|
|
|
|
-- See `:help telescope.builtin`
|
|
|
|
vim.keymap.set("n", "<leader>?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" })
|
|
|
|
vim.keymap.set("n", "<leader><space>", require("telescope.builtin").buffers, { desc = "[ ] Find existing buffers" })
|
|
|
|
vim.keymap.set("n", "<leader>/", function()
|
|
|
|
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
|
|
|
require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
|
|
|
|
winblend = 10,
|
|
|
|
previewer = false,
|
|
|
|
}))
|
|
|
|
end, { desc = "[/] Fuzzily search in current buffer]" })
|
|
|
|
|
|
|
|
vim.keymap.set("n", "<leader>sf", require("telescope.builtin").find_files, { desc = "[S]earch [F]iles" })
|
|
|
|
vim.keymap.set("n", "<leader>sh", require("telescope.builtin").help_tags, { desc = "[S]earch [H]elp" })
|
|
|
|
vim.keymap.set("n", "<leader>sw", require("telescope.builtin").grep_string, { desc = "[S]earch current [W]ord" })
|
|
|
|
vim.keymap.set("n", "<leader>sg", require("telescope.builtin").live_grep, { desc = "[S]earch by [G]rep" })
|
|
|
|
vim.keymap.set("n", "<leader>sd", require("telescope.builtin").diagnostics, { desc = "[S]earch [D]iagnostics" })
|
2023-02-28 18:14:01 -08:00
|
|
|
vim.keymap.set("n", "<leader>su", "<cmd>Telescope undo<cr>", { desc = "[S]earch [U]ndo" })
|
2023-02-10 21:20:55 -08:00
|
|
|
end,
|
|
|
|
}
|