2022-03-07 13:15:36 +01:00
|
|
|
local telescope = require("telescope")
|
2024-07-19 13:10:49 +02:00
|
|
|
local telescope_builtin = require("telescope.builtin")
|
|
|
|
local wk = require("which-key")
|
2022-03-07 13:15:36 +01:00
|
|
|
|
|
|
|
telescope.setup({
|
2022-03-11 14:03:18 +01:00
|
|
|
defaults = {
|
|
|
|
mappings = {
|
|
|
|
i = {
|
2022-03-11 14:04:37 +01:00
|
|
|
["<C-h>"] = "which_key",
|
2022-03-11 14:03:18 +01:00
|
|
|
-- I want the normal readline mappings rather than scrolling
|
|
|
|
["<C-u>"] = false,
|
2023-05-06 19:58:30 +02:00
|
|
|
},
|
|
|
|
},
|
2022-03-11 14:03:18 +01:00
|
|
|
},
|
2022-03-07 13:15:36 +01:00
|
|
|
extensions = {
|
|
|
|
fzf = {
|
|
|
|
fuzzy = true,
|
|
|
|
override_generic_sorter = true,
|
|
|
|
override_file_sorter = true,
|
|
|
|
case_mode = "smart_case",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
telescope.load_extension("fzf")
|
2022-03-08 20:57:28 +01:00
|
|
|
telescope.load_extension("lsp_handlers")
|
2024-07-19 13:10:49 +02:00
|
|
|
|
|
|
|
local keys = {
|
2024-07-20 23:43:19 +02:00
|
|
|
{ "<leader>f", group = "Fuzzy finder" },
|
|
|
|
{ "<leader>fb", telescope_builtin.buffers, desc = "Open buffers" },
|
|
|
|
{ "<leader>ff", telescope_builtin.git_files, desc = "Git tracked files" },
|
|
|
|
{ "<leader>fF", telescope_builtin.find_files, desc = "Files" },
|
|
|
|
{ "<leader>fg", telescope_builtin.live_grep, desc = "Grep string" },
|
|
|
|
{ "<leader>fG", telescope_builtin.grep_string, desc = "Grep string under cursor" },
|
2024-07-19 13:10:49 +02:00
|
|
|
}
|
|
|
|
|
2024-07-20 23:43:19 +02:00
|
|
|
wk.add(keys)
|