summaryrefslogtreecommitdiffstats
path: root/lua/core/highlight.lua
blob: 716c5eda34736d6b948c80947964a2b626d475aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
local highlight = function(group, opts, space)
  if not pcall(require, "mellow") then return end
  space = space or 0

  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

if pcall(require, "mellow") then c = require('mellow.colors').dark end

-- vim highlights -------------------------------------------------------------
highlight('CursorLineNr', { bg = c.bg_dark, fg = c.fg,  bold = true })

-- remove tildas
highlight('EndOfBuffer', { fg = c.bg })

-- plugin highlights ----------------------------------------------------------
-- telescope
highlight('TelescopeMatching', { bg = c.gray01 })
highlight('TelescopeNormal', { bg = c.bg_dark })

highlight('TelescopePreviewBorder', { bg = c.bg_dark })
highlight('TelescopePreviewNormal', { bg = c.bg_dark })
highlight('TelescopePreviewTitle', { bg = c.bg_dark, fg = c.bg_dark })

highlight('TelescopePromptBorder', { bg = c.gray01 })
highlight('TelescopePromptNormal', { bg = c.gray01 })
highlight('TelescopePromptPrefix', { bg = c.gray01 })
highlight('TelescopePromptTitle', { bg = c.gray01 })

highlight('TelescopeResultsBorder', { bg = c.bg_dark })
highlight('TelescopeResultsNormal', { bg = c.bg_dark })
highlight('TelescopeResultsTitle', { bg = c.bg_dark, fg = c.bg_dark })

highlight('TelescopeSelection', { bg = c.bg })
highlight('TelescopeSelectionCaret', { bg = c.bg, fg = c.red})

-- indent blankline
highlight('IndentBlanklineIndent1', { bg = c.bg })
highlight('IndentBlanklineIndent2', { bg = c.bg_dark })

-- alpha
highlight('AlphaHeader', { fg = c.blue })

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