diff options
author | Justine Smithies <justine@smithies.me.uk> | 2023-08-22 19:43:07 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2023-08-22 19:43:07 +0100 |
commit | 86c0c3694c93025dfec23f27266905c12f446a4e (patch) | |
tree | 32ee6e5cc84b6e2962a998d788554cb984fb7a8e /.config/nvim/lua/pluginsconfig/telescope.lua | |
parent | 3058d6df77817de298a207d36b8b0871893c417a (diff) |
Initial commit
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" |