nvim-config/lua/plugins/search-plugin.lua

57 lines
1.2 KiB
Lua
Raw Normal View History

return {
{
"nvim-telescope/telescope.nvim",
tag = "0.1.8",
2024-06-28 14:19:00 +00:00
dependencies = {
2024-08-04 16:53:17 +00:00
{
"nvim-telescope/telescope-live-grep-args.nvim",
version = "^1.0.0",
},
2024-06-28 14:33:49 +00:00
{
"nvim-lua/plenary.nvim",
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
cond = function()
return vim.fn.executable("make") == 1
end,
},
"nvim-telescope/telescope-ui-select.nvim",
"nvim-tree/nvim-web-devicons",
},
2024-06-28 14:19:00 +00:00
},
2024-06-23 05:29:45 +00:00
config = function()
2024-06-28 14:19:00 +00:00
local telescope = require("telescope")
telescope.setup({
2024-06-23 05:29:45 +00:00
defaults = {
2024-08-04 18:37:16 +00:00
-- layout_strategy = "bottom_pane",
2024-06-23 05:29:45 +00:00
layout_strategy = "vertical",
layout_config = {
2024-08-04 18:37:16 +00:00
vertical = { width = 0.85 },
bottom_pane = { width = 0.85 },
},
path_display = {
truncate = 3,
--smart = 3
--shorten = { len = 3},
2024-06-23 05:29:45 +00:00
},
pickers = {
theme = "dropdown",
},
},
2024-06-28 14:19:00 +00:00
extensions = {
live_grep_args = {
auto_quoting = true,
},
2024-06-28 14:33:49 +00:00
["ui-select"] = {
require("telescope.themes").get_dropdown(),
},
2024-06-28 14:19:00 +00:00
},
2024-06-23 05:29:45 +00:00
})
2024-06-28 14:19:00 +00:00
telescope.load_extension("live_grep_args")
2024-06-28 14:33:49 +00:00
pcall(require("telescope").load_extension, "fzf")
pcall(require("telescope").load_extension, "ui-select")
2024-06-23 05:29:45 +00:00
end,
},
}