2021-03-04 07:12:31 +00:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- - Telescope configuration -
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
2021-03-04 13:41:59 +00:00
|
|
|
local actions = require('telescope.actions')
|
|
|
|
require('telescope').setup {
|
|
|
|
defaults = {
|
|
|
|
mappings = {
|
|
|
|
i = {
|
|
|
|
-- Switch out M-q and C-q since C-q will be used more often
|
|
|
|
["<M-q>"] = actions.send_to_qflist + actions.open_qflist,
|
|
|
|
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
|
|
|
},
|
|
|
|
n = {
|
|
|
|
-- Switch out M-q and C-q since C-q will be used more often
|
|
|
|
["<M-q>"] = actions.send_to_qflist + actions.open_qflist,
|
|
|
|
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
2021-03-04 07:12:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
require('telescope').load_extension('dap')
|
|
|
|
|
|
|
|
default_opts = {noremap = true}
|
|
|
|
|
|
|
|
local function set_keymap(...) vim.api.nvim_set_keymap(...) end
|
|
|
|
set_keymap('n', '<C-P>', "<cmd>lua require('telescope.builtin').find_files()<CR>", default_opts)
|
|
|
|
set_keymap('n', '<C-M-F>', "<cmd>lua require('telescope.builtin').live_grep()<CR>", default_opts)
|