@@ -59,19 +59,97 @@ return { -- Fuzzy Finder (files, lsp, etc)
5959 -- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
6060 -- },
6161 -- },
62- -- pickers = {}
62+ defaults = {
63+ prompt_prefix = " " ,
64+ selection_caret = " ❯ " ,
65+ entry_prefix = " " ,
66+ initial_mode = " insert" ,
67+ selection_strategy = " reset" ,
68+ sorting_strategy = " ascending" ,
69+ layout_strategy = " horizontal" ,
70+ layout_config = {
71+ horizontal = {
72+ prompt_position = " top" ,
73+ width = 0.9 ,
74+ height = 0.8 ,
75+ preview_width = 0.6 ,
76+ },
77+ },
78+ borderchars = { " ─" , " │" , " ─" , " │" , " ╭" , " ╮" , " ╯" , " ╰" },
79+
80+ path_display = { " tail" },
81+ get_status_text = function ()
82+ return " "
83+ end ,
84+ },
85+ pickers = {
86+ buffers = {
87+ show_all_buffers = true ,
88+ sort_lastused = true ,
89+ entry_maker = function (entry )
90+ local make_entry = require (" telescope.make_entry" )
91+ local displayer = require (" telescope.pickers.entry_display" ).create ({
92+ separator = " " ,
93+ items = {
94+ { width = 2 },
95+ { remaining = true },
96+ },
97+ })
98+
99+ local original_entry = make_entry .gen_from_buffer ({})(entry )
100+ original_entry .display = function (ent )
101+ local icon , icon_hl = require (" nvim-web-devicons" ).get_icon (
102+ ent .filename ,
103+ string.match (ent .filename , " %a+$" ),
104+ { default = true }
105+ )
106+ return displayer ({
107+ { icon , icon_hl },
108+ { ent .filename , " TelescopeFileName" },
109+ })
110+ end
111+ return original_entry
112+ end ,
113+ },
114+ oldfiles = {
115+ path_display = { " tail" },
116+ },
117+ },
63118 extensions = {
64119 [" ui-select" ] = {
65120 require (" telescope.themes" ).get_dropdown (),
66121 },
67122 },
68123 })
69124
70- -- Enable Telescope extensions if they are installed
125+ local purple = " #bd93f9"
126+ local bg_dark = " #1e1e2e"
127+ local selection_bg = " #3d375e"
128+ local pink = " #ff79c6"
129+ local green = " #50fa7b"
130+
131+ local hl = vim .api .nvim_set_hl
132+
133+ hl (0 , " TelescopeBorder" , { fg = pink })
134+ hl (0 , " TelescopePromptBorder" , { fg = pink })
135+ hl (0 , " TelescopeResultsBorder" , { fg = pink })
136+ hl (0 , " TelescopePreviewBorder" , { fg = pink })
137+
138+ hl (0 , " TelescopePromptTitle" , { fg = bg_dark , bg = purple , bold = true })
139+ hl (0 , " TelescopeResultsTitle" , { fg = bg_dark , bg = pink , bold = true }) -- Pink for Results
140+ hl (0 , " TelescopePreviewTitle" , { fg = bg_dark , bg = green , bold = true }) -- Green for Preview
141+
142+ hl (0 , " TelescopeSelection" , { bg = selection_bg , fg = " #ffffff" , bold = true })
143+ hl (0 , " TelescopeMatching" , { fg = pink , bold = true })
144+ hl (0 , " TelescopePromptPrefix" , { fg = purple })
145+ hl (0 , " TelescopeFileName" , { fg = " #ffffff" })
146+
147+ hl (0 , " TelescopeResultsNumber" , { fg = bg_dark })
148+ hl (0 , " TelescopeResultsSpecialComment" , { fg = bg_dark })
149+
71150 pcall (require (" telescope" ).load_extension , " fzf" )
72151 pcall (require (" telescope" ).load_extension , " ui-select" )
73152
74- -- See `:help telescope.builtin`
75153 local builtin = require (" telescope.builtin" )
76154
77155 vim .keymap .set (" n" , " <leader>sh" , builtin .help_tags , { desc = " search help" })
0 commit comments