telescope: simplify

This commit is contained in:
Guanran Wang 2024-02-21 10:52:04 +08:00
parent 219c001a3c
commit 39bb7b9e08
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
2 changed files with 10 additions and 12 deletions

View file

@ -73,7 +73,16 @@ require("lazy").setup({
},
-- telescope.lua
{ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {},
keys = {
{ "<Space>f", "<cmd>Telescope find_files<CR>", desc = "Find files" },
{ "<Space><Space>", "<cmd>Telescope oldfiles<CR>", desc = "Recent files" },
{ "<Space>sg", "<cmd>Telescope live_grep<CR>", desc = "Live grep" },
},
},
-- treesitter.lua
{
@ -165,6 +174,3 @@ require("lazy").setup({
require("plugins.lspconfig") -- utilizes lsp
require("plugins.completions") -- adds completions
require("plugins.treesitter") -- better highlights
-- QoL
require("plugins.telescope") -- file search

View file

@ -1,8 +0,0 @@
require("telescope").setup()
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<Space>f", builtin.find_files, {})
vim.keymap.set("n", "<Space><Space>", builtin.oldfiles, {})
vim.keymap.set("n", "<Space>sg", builtin.live_grep, {})
vim.keymap.set("n", "<Space>sh", builtin.help_tags, {})