From 9b07ea7d53ba76af8db443d2e649cd967540c1b2 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sun, 16 Jul 2023 14:50:16 +0200 Subject: [PATCH] vim/telescope: enable dynamic title in preview --- config/nvim/lua/user/plugins/telescope.lua | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/config/nvim/lua/user/plugins/telescope.lua b/config/nvim/lua/user/plugins/telescope.lua index ccd580c..72e65b7 100644 --- a/config/nvim/lua/user/plugins/telescope.lua +++ b/config/nvim/lua/user/plugins/telescope.lua @@ -18,11 +18,31 @@ local config = function() telescope.setup { defaults = { + -- ╭────────╮ + -- │ Keymap │ + -- ╰────────╯ + mappings = { i = mappings, n = mappings }, + + -- ╭────────╮ + -- │ Prompt │ + -- ╰────────╯ prompt_prefix = ' ❯ ', selection_caret = ' ', -- Other ideas:  ➔  + + -- ╭─────────╮ + -- │ Results │ + -- ╰─────────╯ multi_icon = ' ', scroll_strategy = 'limit', -- Don't wrap around in results. + -- ╭─────────╮ + -- │ Preview │ + -- ╰─────────╯ + dynamic_preview_title = true, + + -- ╭────────╮ + -- │ Layout │ + -- ╰────────╯ layout_strategy = 'flex', layout_config = { anchor = 'center', @@ -32,10 +52,7 @@ local config = function() horizontal = { preview_width = 0.5, preview_cutoff = 130 }, vertical = { preview_height = 0.5 }, }, - cycle_layout_list = { 'horizontal', 'vertical' }, - - mappings = { i = mappings, n = mappings }, }, extensions = {