dotfiles/.config/nvim/lua/pluginconf/telescope.lua
2022-10-22 00:38:18 +02:00

34 lines
878 B
Lua

local map = vim.api.nvim_set_keymap
require("telescope").setup {
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
"--hidden",
},
},
pickers = {
find_files = {
find_command = { "fd", "--type", "f", "--strip-cwd-prefix", "--hidden" },
},
},
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown {},
},
},
}
require("telescope").load_extension "ui-select"
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 })