diff options
Diffstat (limited to '.config/nvim/lua/pluginsconfig/telescope.lua')
-rw-r--r-- | .config/nvim/lua/pluginsconfig/telescope.lua | 68 |
1 files changed, 68 insertions, 0 deletions
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" |