From 25722f99bd79d078b4990c98370fc749c185bdc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Thu, 16 Nov 2023 02:16:49 +0100 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20deps(nvim):=20nerd=20fonts?= =?UTF-8?q?=20are=20now=20a=20part=20of=20cmp,=20instead=20of=20a=20telesc?= =?UTF-8?q?ope=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/plugins/cmp.lua | 25 ++++++++++++++++++++++++- .config/nvim/lua/plugins/telescope.lua | 9 +-------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index 0ab77f09..48df728a 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -13,6 +13,12 @@ return { { "hrsh7th/cmp-emoji", }, + { + "lukas-reineke/cmp-under-comparator", + }, + { + "chrisgrieser/cmp-nerdfont", + }, }, keys = { { "ciC", ":CmpStatus", desc = "Cmp Status" }, @@ -21,7 +27,12 @@ return { opts.sources = cmp.config.sources( vim.list_extend( opts.sources, - { { name = "emoji" }, { name = "git" }, { name = "fonts", option = { space_filter = "-" } } } + { + { name = "emoji" }, + { name = "git" }, + { name = "fonts", option = { space_filter = "-" } }, + { name = "nerdfont" }, + } ) ) opts.mapping = cmp.mapping.preset.insert({ @@ -47,6 +58,18 @@ return { completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(), } + opts.sorting = { + comparators = { + cmp.config.compare.offset, + cmp.config.compare.exact, + cmp.config.compare.score, + require("cmp-under-comparator").under, + cmp.config.compare.kind, + cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, + }, + } end, }, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 8cbe3d0c..9fea816a 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -5,13 +5,6 @@ return { { "nvim-telescope/telescope.nvim", dependencies = { - { - "2kabhishek/nerdy.nvim", - dependencies = { - "stevearc/dressing.nvim", - }, - cmd = "Nerdy", - }, { "piersolenski/telescope-import.nvim", config = function(_, opts) @@ -139,8 +132,8 @@ return { { "fz", "Telescope zoxide list", desc = "Zoxide" }, { "sp", "Telescope lazy", desc = "Plugins (Lazy)" }, { "sl", "Telescope luasnip", desc = "Luasnip (Snippets)" }, - { "sN", "Nerdy", desc = "Nerd Fonts" }, { "gC", "Telescope git_commits", desc = "Commits" }, + { "uS", Util.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with preview" }, { "ssa", Util.telescope("lsp_document_symbols", {