highlights for cmp and label cmp plugins

This commit is contained in:
2023-07-06 12:30:40 -04:00
parent 0f838d6251
commit a870c77e31
2 changed files with 43 additions and 10 deletions

View File

@ -1,12 +1,19 @@
local highlight = function(group, opts, space) local highlight = function(group, opts, space)
space = space or 0 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 end
local c = require('mellow.colors').dark local c = require('mellow.colors').dark
-- vim highlights ------------------------------------------------------------- -- 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 -- remove tildas
highlight('EndOfBuffer', { fg = c.bg }) highlight('EndOfBuffer', { fg = c.bg })
@ -44,3 +51,29 @@ highlight('FidgetTask', { fg = c.fg })
-- quick fix sign -- quick fix sign
highlight('LightBulbSignTxthl', {fg = c.bright_magenta}) 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' })

View File

@ -73,14 +73,14 @@ require 'dep' {
-- cmp ---------------------------------------------------------------------- -- cmp ----------------------------------------------------------------------
{ 'hrsh7th/nvim-cmp', { 'hrsh7th/nvim-cmp',
deps = { deps = {
'hrsh7th/cmp-buffer', 'lukas-reineke/cmp-under-comparator', -- better results
'FelipeLema/cmp-async-path', 'hrsh7th/cmp-buffer', -- buffers
'hrsh7th/cmp-calc', 'FelipeLema/cmp-async-path', -- path
'saadparwaiz1/cmp_luasnip', 'hrsh7th/cmp-calc', -- calculator
'hrsh7th/cmp-nvim-lua', 'saadparwaiz1/cmp_luasnip', -- snippets
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp', -- lsp
'lukas-reineke/cmp-under-comparator', 'uga-rosa/cmp-dictionary', -- dictionary
'onsails/lspkind.nvim', 'hrsh7th/cmp-nvim-lua', -- nvim lua api
}, },
}, },