summaryrefslogtreecommitdiff
path: root/lua/maps/find.lua
blob: 9d10a5135e8bde57e07734a090f7ad81b056e217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local utility_misc = require("utility.misc")

vim.keymap.set("n", "<leader>p", function()
	require("telescope.builtin").find_files()
end)

vim.keymap.set("n", "<leader>b", function ()
	require("telescope.builtin").buffers()
end)

vim.keymap.set("n", "<leader>gc", function ()
	require("telescope.builtin").git_commits()
end)

vim.keymap.set("n", "<leader>gb", function()
	require("telescope.builtin").git_branches()
end)

vim.keymap.set("n", "<leader>gcl", function()
	require("telescope.builtin").conflicts()
end)

vim.keymap.set("n", "<leader>f", function()
	require("telescope.builtin").live_grep()
end)

vim.keymap.set("n", "<leader>e", function()
	require("telescope").extensions.file_browser.file_browser()
end)

vim.keymap.set("n", "<leader>E", function()
	local curr_buf_dir = utility_misc.dir_name(vim.api.nvim_buf_get_name(0))

	require("telescope").extensions.file_browser.file_browser({ path = curr_buf_dir })
end)