aboutsummaryrefslogtreecommitdiff
path: root/config/nvim/lua/plugins/telescope.lua
blob: b55b46c55105dee7575d2a9faeca71f385945094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
return {
	{
		'nvim-telescope/telescope.nvim', tag = '0.1.8',
		dependencies = { 'nvim-lua/plenary.nvim' },
		lazy = false,

		config = function()
			local builtin = require('telescope.builtin')
			vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
			vim.keymap.set('n', '<C-p>', builtin.git_files, { desc = 'hello world' })
			vim.keymap.set('n', '<leader>cs', function()
				builtin.grep_string({ search = vim.fn.input("Grep > ") });
			end)

			vim.keymap.set("n", "<leader>rw", function()
				builtin.grep_string { search = vim.fn.expand "<cword>", }
			end, { silent = true})
		end
	},
}