From 86c0c3694c93025dfec23f27266905c12f446a4e Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Tue, 22 Aug 2023 19:43:07 +0100 Subject: Initial commit --- .config/nvim/lua/pluginsconfig/telescope.lua | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .config/nvim/lua/pluginsconfig/telescope.lua (limited to '.config/nvim/lua/pluginsconfig/telescope.lua') diff --git a/.config/nvim/lua/pluginsconfig/telescope.lua b/.config/nvim/lua/pluginsconfig/telescope.lua new file mode 100644 index 0000000..27bd252 --- /dev/null +++ b/.config/nvim/lua/pluginsconfig/telescope.lua @@ -0,0 +1,68 @@ +local present, telescope = pcall(require, "telescope") + +if not present then + return +end + +telescope.setup { + picker = { + hidden = false, + }, + defaults = { + vimgrep_arguments = { + "rg", + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + "--no-ignore", + "--smart-case", + "--hidden", + }, + prompt_prefix = "  ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "ascending", + layout_strategy = "horizontal", + layout_config = { + horizontal = { + prompt_position = "top", + preview_width = 0.55, + results_width = 0.8, + }, + vertical = { + mirror = false, + }, + width = 0.87, + height = 0.80, + preview_cutoff = 120, + }, + file_sorter = require("telescope.sorters").get_fuzzy_file, + file_ignore_patterns = { "node_modules", ".git/", "dist/" }, + generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter, + path_display = { "absolute" }, + winblend = 0, + border = {}, + borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, + color_devicons = true, + use_less = true, + set_env = { ["COLORTERM"] = "truecolor" }, + file_previewer = require("telescope.previewers").vim_buffer_cat.new, + grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, + qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, + buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, + }, + extensions = { + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, +} + +--telescope.load_extension "fzf" -- cgit v1.2.3