dotfiles/.config/nvim/lua/plugins/telescope.lua

39 lines
1,010 B
Lua
Raw Normal View History

2024-09-19 08:51:04 +00:00
return {
{
"nvim-telescope/telescope.nvim",
keys = {
-- add a keymap to browse plugin files
-- stylua: ignore
{
"<leader>fp",
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
desc = "Find Plugin File",
},
{
"<leader>/",
"<cmd>lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>",
desc = "Grep (root dir)",
},
},
dependencies = {
{
"nvim-telescope/telescope-live-grep-args.nvim",
},
},
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
file_ignore_patterns = { "/vendor/", "vendor/", "^vendor/" },
},
},
config = function()
local tele = require("telescope")
tele.setup(opts)
tele.load_extension("live_grep_args")
end,
},
}