Skip to content

Commit

Permalink
feat(highlights): blink.cmp (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
strash authored Dec 4, 2024
1 parent a3ffdc7 commit 3a31595
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ A colorscheme for [Neovim](https://github.com/neovim/neovim). Pleasant and produ
- [NvimTree](https://github.com/kyazdani42/nvim-tree.lua)
- [Neo-Tree](https://github.com/nvim-neo-tree/neo-tree.nvim)
- [Nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
- [Blink.cmp](https://github.com/Saghen/blink.cmp)
- [Indent Blankline](https://github.com/lukas-reineke/indent-blankline.nvim)
- [Startify](https://github.com/mhinz/vim-startify)
- [Gitsigns](https://github.com/lewis6991/gitsigns.nvim)
Expand Down
1 change: 1 addition & 0 deletions lua/mellifluous/default_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ return {
colorset = "mellifluous",
plugins = {
cmp = true,
blink_cmp = true,
indent_blankline = true,
nvim_tree = {
enabled = true,
Expand Down
61 changes: 61 additions & 0 deletions lua/mellifluous/highlights/plugins/blink_cmp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
local M = {}

function M.set(hl, colors)
local shader = require("mellifluous.utils.shader")

local pmenu = hl.get("Pmenu")
local type = hl.get("Type")
local func = hl.get("Function")
local id = hl.get("Identifier")
local struct = hl.get("Structure")
local const = hl.get("Constant")
local pmenu_sel = hl.get("PmenuSel")
local dir = hl.get("Directory")
local normal_float = hl.get("NormalFloat")
local non_text = hl.get("NonText")

hl.set("BlinkCmpMenu", { bg = pmenu.bg })
hl.set("BlinkCmpMenuBorder", { bg = pmenu.bg })
hl.set("BlinkCmpMenuSelection", { bg = pmenu_sel.bg, fg = pmenu_sel.fg })
hl.set("BlinkCmpScrollBarThumb", { fg = hl.get("PmenuThumb").fg })
hl.set("BlinkCmpScrollBarGutter", { fg = hl.get("PmenuSbar").fg })
hl.set("BlinkCmpLabel", { fg = pmenu.fg })
hl.set("BlinkCmpLabelDeprecated", { fg = pmenu.fg, style = { strikethrough = true } })
hl.set("BlinkCmpLabelMatch", { fg = colors.fg })
hl.set("BlinkCmpGhostText", { fg = non_text.fg })
hl.set("BlinkCmpKind", { fg = type.fg })
hl.set("BlinkCmpKindText", { fg = hl.get("String").fg })
hl.set("BlinkCmpKindMethod", { fg = func.fg })
hl.set("BlinkCmpKindFunction", { fg = func.fg })
hl.set("BlinkCmpKindConstructor", { fg = func.fg })
hl.set("BlinkCmpKindField", { fg = id.fg })
hl.set("BlinkCmpKindVariable", { fg = id.fg })
hl.set("BlinkCmpKindClass", { fg = type.fg })
hl.set("BlinkCmpKindInterface", { fg = type.fg })
hl.set("BlinkCmpKindModule", { fg = func.fg })
hl.set("BlinkCmpKindProperty", { fg = id.fg })
hl.set("BlinkCmpKindUnit", { fg = struct.fg })
hl.set("BlinkCmpKindValue", { fg = const.fg })
hl.set("BlinkCmpKindEnum", { fg = const.fg })
hl.set("BlinkCmpKindKeyword", { fg = hl.get("Keyword").fg })
hl.set("BlinkCmpKindSnippet", { fg = hl.get("Special").fg })
hl.set("BlinkCmpKindColor", { fg = hl.get("Label").fg })
hl.set("BlinkCmpKindFile", { fg = dir.fg })
hl.set("BlinkCmpKindReference", { fg = hl.get("StorageClass").fg })
hl.set("BlinkCmpKindFolder", { fg = dir.fg })
hl.set("BlinkCmpKindEnumMember", { fg = const.fg })
hl.set("BlinkCmpKindConstant", { fg = const.fg })
hl.set("BlinkCmpKindStruct", { fg = struct.fg })
hl.set("BlinkCmpKindEvent", { fg = hl.get("Repeat").fg })
hl.set("BlinkCmpKindOperator", { fg = hl.get("Operator").fg })
hl.set("BlinkCmpKindTypeParameter", { fg = type.fg })
hl.set("BlinkCmpSource", { fg = non_text.fg })
hl.set("BlinkCmpDoc", { bg = normal_float.bg })
hl.set("BlinkCmpDocBorder", { link = "FloatBorder" })
hl.set("BlinkCmpDocCursorLine", { bg = shader.replicate_shade(colors.bg, hl.get("CursorLine").bg, normal_float.bg) })
hl.set("BlinkCmpSignatureHelp", { bg = normal_float.bg })
hl.set("BlinkCmpSignatureHelpBorder", { bg = normal_float.bg })
hl.set("BlinkCmpSignatureHelpActiveParameter", { bg = hl.get("LspSignatureActiveParameter").bg })
end

return M

0 comments on commit 3a31595

Please sign in to comment.