-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpicker.lua
More file actions
55 lines (52 loc) · 1.73 KB
/
Copy pathpicker.lua
File metadata and controls
55 lines (52 loc) · 1.73 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
vim.schedule(function()
vim.pack.add {
"https://github.com/nvim-telescope/telescope.nvim",
"https://github.com/nvim-lua/plenary.nvim",
}
local telescope = require "telescope"
local actions = require "telescope.actions"
telescope.setup {
defaults = {
prompt_prefix = lib.icons.ui.Telescope .. " ",
selection_caret = lib.icons.ui.ChevronRight .. " ",
dynamic_preview_title = true,
results_title = false,
path_display = {
"smart",
"filename_first",
},
file_ignore_patterns = { "%.meta" },
sorting_strategy = "ascending",
layout_strategy = "vertical",
layout_config = {
anchor = "CENTER",
width = 0.5,
height = 0.85,
prompt_position = "top",
},
},
pickers = {
find_files = {
preview = false,
hidden = true,
find_command = { "fd", "--type", "f", "-E", ".git" },
layout_config = {
height = 0.35,
width = 0.4,
},
},
buffers = {
mappings = {
i = {
["<C-x>"] = actions.delete_buffer + actions.move_to_top,
},
},
},
},
}
lib.set_keymaps {
{ "n", "<leader>sf", "<cmd>Telescope find_files<cr>", { desc = "Find Files" } },
{ "n", "<leader>st", "<cmd>Telescope live_grep<cr>", { desc = "Find Grep" } },
{ "n", "<leader>sb", "<cmd>Telescope buffers<cr>", { desc = "Find Buffers" } },
}
end)