highlights for cmp and label cmp plugins

This commit is contained in:
2023-07-06 12:30:40 -04:00
parent 72fbdb3be7
commit 1b5f192832
2 changed files with 43 additions and 10 deletions

View File

@ -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' })

View File

@ -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
},
},