From d1c695ff5d95a44f5513fc21d35014a236c1fcb5 Mon Sep 17 00:00:00 2001 From: 409 Date: Thu, 8 Aug 2024 17:07:11 +0200 Subject: [PATCH] fix(theme): cmp selection and border colors --- lua/409/plugins/completion.lua | 9 +++++---- lua/409/plugins/theme.lua | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/409/plugins/completion.lua b/lua/409/plugins/completion.lua index 9bd7738..0e33526 100644 --- a/lua/409/plugins/completion.lua +++ b/lua/409/plugins/completion.lua @@ -8,11 +8,12 @@ return { opts = function() local cmp = require("cmp") local lspkind = require("lspkind") - local border = require("409.ui").border local cmp_select = { behavior = cmp.SelectBehavior.Select } local winhighlight = "Normal:CmpPmenu,FloatBorder:CmpPmenuBorder,CursorLine:PmenuSel,Search:None" + vim.api.nvim_set_hl(0, "CmpPmenuBorder", { link = "FloatBorder" }) + return { snippet = { expand = function(args) @@ -36,18 +37,18 @@ return { }, window = { documentation = { - border = border, + border = "single", winhighlight = winhighlight, }, completion = { - border = border, + border = "single", winhighlight = winhighlight, }, }, formatting = { fields = { "kind", "abbr", "menu" }, format = function(entry, vim_item) - local kind = lspkind.cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item) + local kind = lspkind.cmp_format({ mode = "symbol_text", maxwidth = 70 })(entry, vim_item) local strings = vim.split(kind.kind, "%s", { trimempty = true }) kind.kind = " " .. (strings[1] or "") .. " " kind.menu = " (" .. (strings[2] or "") .. ")" diff --git a/lua/409/plugins/theme.lua b/lua/409/plugins/theme.lua index 7db3277..ba82985 100644 --- a/lua/409/plugins/theme.lua +++ b/lua/409/plugins/theme.lua @@ -13,6 +13,7 @@ return { vim.api.nvim_set_hl(0, "TelescopeResultsBorder", { fg = "#44475a" }) vim.api.nvim_set_hl(0, "TelescopePromptCounter", { fg = "#44475a" }) vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#44475a" }) + vim.api.nvim_set_hl(0, "PmenuSel", { fg = "#282a36", bg = "#50fa7b", bold = true }) end, }, }