46 lines
1.9 KiB
Lua
46 lines
1.9 KiB
Lua
|
return {
|
||
|
"nvim-telescope/telescope.nvim",
|
||
|
branch = "0.1.x",
|
||
|
dependencies = {
|
||
|
{
|
||
|
{ "nvim-lua/plenary.nvim" },
|
||
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||
|
{ "tsakirist/telescope-lazy.nvim", dependencies = { "folke/lazy.nvim" } },
|
||
|
{ "benfowler/telescope-luasnip.nvim", dependencies = { "L3MON4D3/LuaSnip" } },
|
||
|
},
|
||
|
},
|
||
|
cmd = "Telescope",
|
||
|
init = function()
|
||
|
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>")
|
||
|
vim.keymap.set("n", "<leader>fh", "<cmd>Telescope help_tags<cr>")
|
||
|
vim.keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>")
|
||
|
vim.keymap.set("n", "<leader>fg", "<cmd>Telescope live_grep<cr>")
|
||
|
vim.keymap.set("n", "<leader>fs", "<cmd>Telescope lsp_document_symbols<cr>")
|
||
|
vim.keymap.set("n", "<leader>ft", "<cmd>Telescope treesitter<cr>")
|
||
|
vim.keymap.set("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<cr>")
|
||
|
vim.keymap.set("n", "<leader>fl", "<cmd>Telescope lazy<cr>")
|
||
|
end,
|
||
|
config = function()
|
||
|
local trouble = require "trouble.providers.telescope"
|
||
|
require("telescope").setup {
|
||
|
defaults = {
|
||
|
layout_strategy = "flex",
|
||
|
mappings = {
|
||
|
i = { ["<c-t>"] = trouble.open_with_trouble },
|
||
|
n = { ["<c-t>"] = trouble.open_with_trouble },
|
||
|
},
|
||
|
winblend = vim.o.winblend,
|
||
|
},
|
||
|
extensions = {
|
||
|
fzf = {
|
||
|
fuzzy = true, -- false will only do exact matching
|
||
|
override_generic_sorter = true, -- override the generic sorter
|
||
|
override_file_sorter = true, -- override the file sorter
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
require("telescope").load_extension "fzf"
|
||
|
require("telescope").load_extension "lazy"
|
||
|
end,
|
||
|
}
|