lazy: fix telescope config
This commit is contained in:
parent
d96f24b86e
commit
9e9d8abf15
1 changed files with 11 additions and 5 deletions
|
|
@ -7,14 +7,17 @@ return {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope-fzy-native.nvim",
|
"nvim-telescope/telescope-fzy-native.nvim",
|
||||||
build = "make",
|
-- build = "make",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<Leader>b", require("telescope.builtin").buffers, desc = "Telescope buffers" },
|
{ "<Leader>b", desc = "Telescope buffers" },
|
||||||
{ "<Leader>f", require("telescope.builtin").find_files, desc = "Telescope find files" },
|
{ "<Leader>f", desc = "Telescope find files" },
|
||||||
{ "<Leader>g", require("telescope.builtin").live_grep, desc = "Telescope live grep" },
|
{ "<Leader>g", desc = "Telescope live grep" },
|
||||||
{ "<Leader>/", require("telescope.builtin").current_buffer_fuzzy_find, desc = "Telescope current buffer fuzzy find" },
|
{ "<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()
|
config = function()
|
||||||
local telescope = require("telescope")
|
local telescope = require("telescope")
|
||||||
|
|
@ -31,6 +34,9 @@ return {
|
||||||
telescope.load_extension("fzy_native")
|
telescope.load_extension("fzy_native")
|
||||||
telescope.load_extension("luasnip")
|
telescope.load_extension("luasnip")
|
||||||
local builtin = require("telescope.builtin")
|
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>cg", builtin.grep_string)
|
||||||
vim.keymap.set("n", "<Leader>:", builtin.commands)
|
vim.keymap.set("n", "<Leader>:", builtin.commands)
|
||||||
vim.keymap.set("n", "<Leader>s", telescope.extensions.luasnip.luasnip)
|
vim.keymap.set("n", "<Leader>s", telescope.extensions.luasnip.luasnip)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue