63 lines
1.3 KiB
Lua
63 lines
1.3 KiB
Lua
return {
|
|
"nvim-telescope/telescope.nvim",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"gbprod/yanky.nvim",
|
|
},
|
|
config = function()
|
|
local builtin = require("telescope.builtin")
|
|
local shared_ignores = {
|
|
-- Core / Git
|
|
"^%.git/",
|
|
-- Python
|
|
"__pycache__/",
|
|
"%.pyc",
|
|
"%.pyo",
|
|
"%.pyd",
|
|
"%.venv/",
|
|
"env/",
|
|
"%.egg%-info/",
|
|
"%.ruff_cache",
|
|
"%.pytest_cache",
|
|
"%uv.lock",
|
|
-- Go
|
|
"^vendor/",
|
|
"bin/",
|
|
"%.exe",
|
|
-- React / Vue / JavaScript
|
|
"node_modules/",
|
|
"dist/",
|
|
"build/",
|
|
"%.next/",
|
|
"%.nuxt/",
|
|
"%.output/",
|
|
-- Miscellaneous system files
|
|
"%.DS_Store",
|
|
"%.cache/",
|
|
}
|
|
|
|
vim.keymap.set("n", "<leader>ff", function()
|
|
builtin.find_files({
|
|
hidden = true,
|
|
no_ignore = true,
|
|
file_ignore_patterns = shared_ignores,
|
|
})
|
|
end, opts)
|
|
vim.keymap.set("n", "<leader>fg", function()
|
|
builtin.live_grep({
|
|
additional_args = function()
|
|
return { "--hidden", "--no-ignore" }
|
|
end,
|
|
file_ignore_patterns = shared_ignores,
|
|
})
|
|
end, opts)
|
|
vim.keymap.set("n", "<leader>fb", builtin.buffers, opts)
|
|
|
|
require("yanky").setup()
|
|
require("telescope").load_extension("yank_history")
|
|
vim.keymap.set("n", "<leader>fy", function()
|
|
vim.cmd.Telescope("yank_history")
|
|
end, opts)
|
|
end,
|
|
}
|