dotfiles/dot_config/nvim/lua/plugins/telescope.lua

33 lines
1.2 KiB
Lua

return {
'nvim-telescope/telescope.nvim', tag = '0.1.5',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local actions = require("telescope.actions")
require('telescope').setup({
defaults = {
mappings = {
i = { ["<esc>"] = actions.close },
},
},
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case",
},
})
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>\'', builtin.marks, {})
vim.keymap.set('n', '<leader>.', builtin.find_files, {})
vim.keymap.set('n', '<leader>,.', builtin.find_files, {})
vim.keymap.set('n', '<leader>,/', builtin.live_grep, {})
vim.keymap.set('n', '<leader>,,', builtin.buffers, {})
vim.keymap.set('n', '<leader>,;', builtin.command_history, {})
vim.keymap.set('n', '<leader>,?', builtin.search_history, {})
require("telescope").load_extension('fzf')
end
}