local function config_telescope() local actions = require("telescope.actions") require("telescope").setup{ defaults = { vimgrep_arguments = { "rg", "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case", }, mappings = { i = { [""] = actions.close, -- Disable scroll-up to allow clearing prompt [""] = false, } }, layout_strategy = "flex", } } local opts = {silent=true, noremap=true} vim.api.nvim_set_keymap("n", "", "Telescope find_files", opts) vim.api.nvim_set_keymap("n", "ff", "Telescope find_files", opts) vim.api.nvim_set_keymap("n", "fh", "Telescope help_tags", opts) vim.api.nvim_set_keymap("n", "b", "Telescope buffers", opts) vim.api.nvim_set_keymap("n", "fb", "Telescope buffers", opts) vim.api.nvim_set_keymap("n", "t", "Telescope current_buffer_tags", opts) vim.api.nvim_set_keymap("n", "ft", "Telescope tags", opts) vim.api.nvim_set_keymap("n", "fg", "Telescope live_grep", opts) vim.cmd "command Rg Telescope live_grep" vim.cmd "command Grep Telescope live_grep" end config_telescope()