1
0
Fork 0

lazy: fix telescope config

This commit is contained in:
Felipe 2024-09-20 15:27:49 -03:00
parent d96f24b86e
commit 9e9d8abf15
Signed by: pitbuster
SSH key fingerprint: SHA256:NLWXDJvkNDPTnUszcKt0McVeXWKTe5Lz0cIocZbA/pY

View file

@ -7,14 +7,17 @@ return {
"nvim-tree/nvim-web-devicons",
{
"nvim-telescope/telescope-fzy-native.nvim",
build = "make",
-- build = "make",
},
},
keys = {
{ "<Leader>b", require("telescope.builtin").buffers, desc = "Telescope buffers" },
{ "<Leader>f", require("telescope.builtin").find_files, desc = "Telescope find files" },
{ "<Leader>g", require("telescope.builtin").live_grep, desc = "Telescope live grep" },
{ "<Leader>/", require("telescope.builtin").current_buffer_fuzzy_find, desc = "Telescope current buffer fuzzy find" },
{ "<Leader>b", desc = "Telescope buffers" },
{ "<Leader>f", desc = "Telescope find files" },
{ "<Leader>g", desc = "Telescope live grep" },
{ "<Leader>cg", desc = "Telescope current word grep" },
{ "<Leader>/", desc = "Telescope current buffer fuzzy find" },
{ "<Leader>:", desc = "Telescope commands" },
{ "<Leader>s", desc = "Telescope snippets" },
},
config = function()
local telescope = require("telescope")
@ -31,6 +34,9 @@ return {
telescope.load_extension("fzy_native")
telescope.load_extension("luasnip")
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<Leader>b", builtin.buffers)
vim.keymap.set("n", "<Leader>f", builtin.find_files)
vim.keymap.set("n", "<Leader>g", builtin.live_grep)
vim.keymap.set("n", "<Leader>cg", builtin.grep_string)
vim.keymap.set("n", "<Leader>:", builtin.commands)
vim.keymap.set("n", "<Leader>s", telescope.extensions.luasnip.luasnip)