From 1b5f19283295a524be498152e56b1324a240e8ac Mon Sep 17 00:00:00 2001
From: Squibid <me@zacharyscheiman.com>
Date: Thu, 6 Jul 2023 12:30:40 -0400
Subject: highlights for cmp and label cmp plugins

---
 lua/core/highlight.lua | 37 +++++++++++++++++++++++++++++++++++--
 lua/core/plugins.lua   | 16 ++++++++--------
 2 files changed, 43 insertions(+), 10 deletions(-)

(limited to 'lua/core')

diff --git a/lua/core/highlight.lua b/lua/core/highlight.lua
index d1f09db..365c4b5 100644
--- a/lua/core/highlight.lua
+++ b/lua/core/highlight.lua
@@ -1,12 +1,19 @@
 local highlight = function(group, opts, space)
   space = space or 0
-  a.nvim_set_hl(space, group, opts)
+
+  if type(group) == 'table' then
+    for i in pairs(group) do
+      a.nvim_set_hl(space, group[i], opts)
+    end
+  elseif type(group) == 'string' then
+    a.nvim_set_hl(space, group, opts)
+  end
 end
 
 local c = require('mellow.colors').dark
 
 -- vim highlights -------------------------------------------------------------
-highlight("CursorLineNr", { bg = c.bg_dark, fg = c.fg,  bold = true })
+highlight('CursorLineNr', { bg = c.bg_dark, fg = c.fg,  bold = true })
 
 -- remove tildas
 highlight('EndOfBuffer', { fg = c.bg })
@@ -44,3 +51,29 @@ highlight('FidgetTask', { fg = c.fg })
 
 -- quick fix sign
 highlight('LightBulbSignTxthl', {fg = c.bright_magenta})
+
+-- completion highlights
+highlight('CmpItemAbbrDeprecated',    { fg = c.gray06, strikethrough = true })
+highlight('CmpItemAbbrMatch',         { fg = c.yellow, bold = true })
+highlight('CmpItemAbbrMatchFuzzy',    { fg = c.yellow, bold = true })
+highlight('CmpItemMenu',              { fg = c.magenta, italic = true })
+
+highlight({ 'CmpItemKindField', 'CmpItemKindProperty', 'CmpItemKindEvent' },
+  { fg = '#EED8DA', bg = '#B5585F' })
+highlight({ 'CmpItemKindText', 'CmpItemKindEnum', 'CmpItemKindKeyword' },
+  { fg = '#C3E88D', bg = '#9FBD73' })
+highlight({ 'CmpItemKindConstant', 'CmpItemKindConstructor',
+  'CmpItemKindReference' },
+  { fg = '#FFE082', bg = '#D4BB6C' })
+highlight({ 'CmpItemKindFunction', 'CmpItemKindStruct', 'CmpItemKindClass',
+  'CmpItemKindModule', 'CmpItemKindOperator', },
+  { fg = '#EADFF0', bg = '#A377BF', })
+highlight({ 'CmpItemKindVariable', 'CmpItemKindFile' },
+  { fg = '#C5CDD9', bg = '#7E8294' })
+highlight({ 'CmpItemKindUnit', 'CmpItemKindSnippet', 'CmpItemKindFolder' },
+  { fg = '#F5EBD9', bg = '#D4A959' })
+highlight({ 'CmpItemKindMethod', 'CmpItemKindValue', 'CmpItemKindEnumMember' },
+  { fg = '#DDE5F5', bg = '#6C8ED4' })
+highlight({ 'CmpItemKindInterface', 'CmpItemKindColor',
+  'CmpItemKindTypeParameter' },
+  { fg = '#D8EEEB', bg = '#58B5A8' })
diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua
index 741c745..ffe2941 100644
--- a/lua/core/plugins.lua
+++ b/lua/core/plugins.lua
@@ -73,14 +73,14 @@ require 'dep' {
   -- cmp ----------------------------------------------------------------------
   { 'hrsh7th/nvim-cmp',
     deps = {
-      'hrsh7th/cmp-buffer',
-      'FelipeLema/cmp-async-path',
-      'hrsh7th/cmp-calc',
-      'saadparwaiz1/cmp_luasnip',
-      'hrsh7th/cmp-nvim-lua',
-      'hrsh7th/cmp-nvim-lsp',
-      'lukas-reineke/cmp-under-comparator',
-      'onsails/lspkind.nvim',
+      'lukas-reineke/cmp-under-comparator', -- better results
+      'hrsh7th/cmp-buffer', -- buffers
+      'FelipeLema/cmp-async-path', -- path
+      'hrsh7th/cmp-calc', -- calculator
+      'saadparwaiz1/cmp_luasnip', -- snippets
+      'hrsh7th/cmp-nvim-lsp', -- lsp
+      'uga-rosa/cmp-dictionary', -- dictionary
+      'hrsh7th/cmp-nvim-lua', -- nvim lua api
     },
   },
 
-- 
cgit v1.2.1