From 5a533becb0f5aac3f579581d3812f0a2010f182c Mon Sep 17 00:00:00 2001 From: doryan Date: Sun, 13 Apr 2025 14:44:47 +0400 Subject: [PATCH] feat(ui): add telescope ui select for improve UI --- lua/config/plugins/telescope.lua | 23 +++++++++++++++++++++++ lua/plugins/core/init.lua | 6 +++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/lua/config/plugins/telescope.lua b/lua/config/plugins/telescope.lua index 56cc1f2..457000e 100644 --- a/lua/config/plugins/telescope.lua +++ b/lua/config/plugins/telescope.lua @@ -1,6 +1,29 @@ +require("telescope").load_extension("ui-select") + require("telescope").setup({ defaults = { borderchars = { " ", " ", " ", " ", " ", " ", " ", " " } + }, + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown { + -- even more opts + } + + -- pseudo code / specification for writing custom displays, like the one + -- for "codeactions" + -- specific_opts = { + -- [kind] = { + -- make_indexed = function(items) -> indexed_items, width, + -- make_displayer = function(widths) -> displayer + -- make_display = function(displayer) -> function(e) + -- make_ordinal = function(e) -> string + -- }, + -- -- for example to disable the custom builtin "codeactions" display + -- do the following + -- codeactions = false, + -- } + } } }) diff --git a/lua/plugins/core/init.lua b/lua/plugins/core/init.lua index 35a4075..cab11d0 100644 --- a/lua/plugins/core/init.lua +++ b/lua/plugins/core/init.lua @@ -3,6 +3,9 @@ return { { 'simrat39/inlay-hints.nvim', }, + { + 'nvim-telescope/telescope-ui-select.nvim' + }, { "akinsho/bufferline.nvim", }, @@ -47,9 +50,6 @@ return { }, { "nvim-telescope/telescope.nvim", - dependencies = { - 'nvim-telescope/telescope-ui-select.nvim', - } }, { "williamboman/mason-lspconfig.nvim",