Add plugin telescope

This commit is contained in:
leafee98 2024-08-27 00:00:04 +08:00
parent f02b914b90
commit de011cad9d

14
lua/plugins/telescope.lua Normal file
View file

@ -0,0 +1,14 @@
return {
'nvim-telescope/telescope.nvim',
branch = 'master',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function (_, opts)
require("telescope").setup(opts)
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set('n', '<leader>fk', builtin.keymaps, {})
end,
}