-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(group): add support for blink.cmp
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ M.module_names = { | |
"alpha", | ||
"aerial", | ||
"barbar", | ||
"blink", | ||
"cmp", | ||
"coc", | ||
"dap_ui", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
-- https://github.com/Saghen/blink.cmp | ||
-- Adapted links and colors from groups/modules/cmp.lua | ||
|
||
local M = {} | ||
|
||
function M.get(spec, config, opts) | ||
local has_ts = config.modules.treesitter | ||
local syn = spec.syntax | ||
|
||
-- stylua: ignore | ||
return { | ||
BlinkCmpDoc = { fg = spec.fg1, bg = spec.bg0 }, | ||
BlinkCmpDocBorder = { fg = spec.sel0, bg = spec.bg0 }, | ||
|
||
BlinkCmpLabel = { fg = spec.fg1, }, | ||
BlinkCmpLabelDeprecated = { fg = syn.dep, style = "strikethrough" }, | ||
BlinkCmpLabelMatch = { fg = syn.func, }, | ||
|
||
BlinkCmpKindDefault = { fg = spec.fg2, }, | ||
BlinkCmpLabelDetail = { link = "Comment" }, | ||
|
||
BlinkCmpKindKeyword = { link = "Identifier" }, | ||
|
||
BlinkCmpKindVariable = { link = has_ts and "@variable" or "Identifier" }, | ||
BlinkCmpKindConstant = { link = has_ts and "@constant" or "Constant" }, | ||
BlinkCmpKindReference = { link = "Keyword" }, | ||
BlinkCmpKindValue = { link = "Keyword" }, | ||
|
||
BlinkCmpKindFunction = { link = "Function" }, | ||
BlinkCmpKindMethod = { link = "Function" }, | ||
BlinkCmpKindConstructor = { link = "Function" }, | ||
|
||
BlinkCmpKindInterface = { link = "Constant" }, | ||
BlinkCmpKindEvent = { link = "Constant" }, | ||
BlinkCmpKindEnum = { link = "Constant" }, | ||
BlinkCmpKindUnit = { link = "Constant" }, | ||
|
||
BlinkCmpKindClass = { link = "Type" }, | ||
BlinkCmpKindStruct = { link = "Type" }, | ||
|
||
BlinkCmpKindModule = { link = has_ts and "@namespace" or "Identifier" }, | ||
|
||
BlinkCmpKindProperty = { link = has_ts and "@property" or "Identifier" }, | ||
BlinkCmpKindField = { link = has_ts and "@field" or "Identifier" }, | ||
BlinkCmpKindTypeParameter = { link = has_ts and "@field" or "Identifier" }, | ||
BlinkCmpKindEnumMember = { link = has_ts and "@field" or "Identifier" }, | ||
BlinkCmpKindOperator = { link = "Operator" }, | ||
BlinkCmpKindSnippet = { fg = spec.fg2 }, | ||
} | ||
end | ||
|
||
return M |