nix-config/home/neovim/lua/plugins/telescope.lua

59 lines
2.2 KiB
Lua

return {
'nvim-telescope/telescope.nvim',
dependencies = {
{
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make'
},
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope-symbols.nvim',
"nvim-telescope/telescope-bibtex.nvim",
{
'nvim-telescope/telescope-media-files.nvim',
dependencies = {
'nvim-lua/popup.nvim',
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
'nvim-telescope/telescope-media-files.nvim',
},
},
},
config = function()
local telescope = require("telescope")
telescope.setup {
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
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
},
-- media_files = {
-- -- filetypes whitelist
-- -- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
-- filetypes = { "png", "webp", "jpg", "jpeg" },
-- -- find command (defaults to `fd`)
-- find_cmd = "rg"
-- },
bibtex = {
global_files = { vim.fn.expand("~/notes/refs") },
}
}
}
telescope.load_extension("fzf")
telescope.load_extension("media_files")
telescope.load_extension("bibtex")
end,
keys = {
{ '<leader>ff', '<cmd>Telescope find_files<cr>' },
{ '<leader>fg', '<cmd>Telescope live_grep<cr>' },
{ '<leader>fb', '<cmd>Telescope buffers<cr>' },
{ '<leader>fh', '<cmd>Telescope help_tags<cr>' },
{ '<leader>fs', function()
require('telescope_builtin').symbols({ sources = 'emoji', 'gitmoji', 'nerd' })
end },
-- { '<leader>fb', "<cmd>Telescope bibtex<cr>"}
}
}