dotfiles/mzte-nv/conf/lua/pluginconf/telescope.lua

38 lines
999 B
Lua
Raw Normal View History

2022-12-23 00:08:07 +01:00
local telescope = require "telescope"
2022-10-22 00:38:18 +02:00
local map = vim.api.nvim_set_keymap
2022-12-23 00:08:07 +01:00
telescope.setup {
2021-11-05 17:44:11 +01:00
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
2022-07-06 23:04:52 +02:00
"--hidden",
2021-11-05 17:44:11 +01:00
},
},
2022-01-22 17:58:41 +01:00
2022-05-06 14:36:32 +02:00
pickers = {
find_files = {
find_command = { "fd", "--type", "f", "--strip-cwd-prefix", "--hidden" },
},
},
2022-01-22 17:58:41 +01:00
extensions = {
["ui-select"] = {
2022-01-23 01:25:35 +01:00
require("telescope.themes").get_dropdown {},
},
2022-01-22 17:58:41 +01:00
},
2021-11-05 17:44:11 +01:00
}
2022-01-22 17:58:41 +01:00
2022-12-23 00:08:07 +01:00
telescope.load_extension "ui-select"
telescope.load_extension "harpoon"
2022-10-22 00:38:18 +02:00
map("n", "ff", "<cmd>Telescope find_files<cr>", { silent = true })
map("n", "fg", "<cmd>Telescope live_grep<cr>", { silent = true })
map("n", "gs", "<cmd>Telescope lsp_dynamic_workspace_symbols<cr>", { silent = true })
2022-12-23 00:08:07 +01:00
map("n", "gm", "<cmd>Telescope harpoon marks<cr>", { silent = true })