2022-10-17 20:40:36 +02:00
|
|
|
-- import telescope plugin safely
|
|
|
|
local telescope_setup, telescope = pcall(require, "telescope")
|
|
|
|
if not telescope_setup then
|
2022-11-05 22:13:18 +01:00
|
|
|
return
|
2022-10-17 20:40:36 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- import telescope actions safely
|
|
|
|
local actions_setup, actions = pcall(require, "telescope.actions")
|
|
|
|
if not actions_setup then
|
2022-11-05 22:13:18 +01:00
|
|
|
return
|
2022-10-17 20:40:36 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- configure telescope
|
|
|
|
telescope.setup({
|
2022-11-05 22:13:18 +01:00
|
|
|
-- configure custom mappings
|
|
|
|
defaults = {
|
|
|
|
mappings = {
|
|
|
|
i = {
|
|
|
|
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
|
|
|
["<C-j>"] = actions.move_selection_next, -- move to next result
|
|
|
|
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, -- send selected to quickfixlist
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-10-17 20:40:36 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
telescope.load_extension("fzf")
|