-
-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathcmp.lua
52 lines (39 loc) · 1.97 KB
/
cmp.lua
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
-- https://github.com/hrsh7th/nvim-cmp
local M = {}
function M.get(spec, config, opts)
local has_ts = config.modules.treesitter
local syn = spec.syntax
-- stylua: ignore
return {
CmpDocumentation = { fg = spec.fg1, bg = spec.bg0 },
CmpDocumentationBorder = { fg = spec.sel0, bg = spec.bg0 },
CmpItemAbbr = { fg = spec.fg1, },
CmpItemAbbrDeprecated = { fg = syn.dep, style = 'strikethrough' },
CmpItemAbbrMatch = { fg = syn.func, },
CmpItemAbbrMatchFuzzy = { fg = syn.func, },
CmpItemKindDefault = { fg = spec.fg2, },
CmpItemMenu = { link = 'Comment' },
CmpItemKindKeyword = { link = 'Identifier' },
CmpItemKindVariable = { link = has_ts and '@variable' or 'Identifier' },
CmpItemKindConstant = { link = has_ts and '@constant' or 'Constant' },
CmpItemKindReference = { link = 'Keyword' },
CmpItemKindValue = { link = 'Keyword' },
CmpItemKindFunction = { link = 'Function' },
CmpItemKindMethod = { link = 'Function' },
CmpItemKindConstructor = { link = 'Function' },
CmpItemKindInterface = { link = 'Constant' },
CmpItemKindEvent = { link = 'Constant' },
CmpItemKindEnum = { link = 'Constant' },
CmpItemKindUnit = { link = 'Constant' },
CmpItemKindClass = { link = 'Type' },
CmpItemKindStruct = { link = 'Type' },
CmpItemKindModule = { link = has_ts and '@module' or 'Identifier' },
CmpItemKindProperty = { link = has_ts and '@property' or 'Identifier' },
CmpItemKindField = { link = has_ts and '@variable.member' or 'Identifier' },
CmpItemKindTypeParameter = { link = has_ts and '@variable.member' or 'Identifier' },
CmpItemKindEnumMember = { link = has_ts and '@variable.member' or 'Identifier' },
CmpItemKindOperator = { link = 'Operator' },
CmpItemKindSnippet = { fg = spec.fg2 },
}
end
return M