From 5c1a0784b6a467457d85082d87445e9a888f4f15 Mon Sep 17 00:00:00 2001 From: Jonas Schneider Date: Fri, 22 Nov 2024 10:50:18 +0100 Subject: [PATCH 1/3] feat: add blink.cmp hlgroups --- lua/kanagawa/highlights/plugins.lua | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/lua/kanagawa/highlights/plugins.lua b/lua/kanagawa/highlights/plugins.lua index 2383987..d2fb7ca 100644 --- a/lua/kanagawa/highlights/plugins.lua +++ b/lua/kanagawa/highlights/plugins.lua @@ -184,6 +184,50 @@ function M.setup(colors, config) CmpItemKindTypeParameter = { link = "Type" }, CmpItemKindCopilot = { link = "String" }, + -- blink.cmp + BlinkCmpMenu = { link = "Pmenu" }, + BlinkCmpMenuSelection = { fg = "NONE", bg = theme.ui.pmenu.bg_sel }, + BlinkCmpMenuBorder = { fg = theme.ui.bg_search, bg = theme.ui.pmenu.bg }, + BlinkCmpScrollBarThumb = { link = "PmenuThumb" }, + BlinkCmpScrollBarGutter = {link = "PmenuSbar" }, + BlinkCmpLabel = { fg = theme.ui.pmenu.fg }, + BlinkCmpLabelMatch = { fg = theme.syn.fun }, + BlinkCmpLabelDeprecated = { fg = theme.syn.comment, strikethrough = true }, + BlinkCmpGhostText = { fg = theme.syn.comment }, + BlinkCmpDoc = { link = "NormalFloat" }, + BlinkCmpDocBorder = { link = "FloatBorder" }, + BlinkCmpDocCursorLine = { link = "Visual"}, + BlinkCmpSignatureHelp = { link = "NormalFloat" }, + BlinkCmpSignatureHelpBorder = { link = "FloatBorder" }, + BlinkCmpSignatureHelpActiveParameter = { link = "LspSignatureActiveParameter"}, + + BlinkCmpItemKindText = { fg = theme.ui.fg }, + BlinkCmpItemKindMethod = { link = "@function.method" }, + BlinkCmpItemKindFunction = { link = "Function" }, + BlinkCmpItemKindConstructor = { link = "@constructor" }, + BlinkCmpItemKindField = { link = "@variable.member" }, + BlinkCmpItemKindVariable = { fg = theme.ui.fg_dim }, + BlinkCmpItemKindClass = { link = "Type" }, + BlinkCmpItemKindInterface = { link = "Type" }, + BlinkCmpItemKindModule = { link = "@module" }, + BlinkCmpItemKindProperty = { link = "@property" }, + BlinkCmpItemKindUnit = { link = "Number" }, + BlinkCmpItemKindValue = { link = "String" }, + BlinkCmpItemKindEnum = { link = "Type" }, + BlinkCmpItemKindKeyword = { link = "Keyword" }, + BlinkCmpItemKindSnippet = { link = "Special" }, + BlinkCmpItemKindColor = { link = "Special" }, + BlinkCmpItemKindFile = { link = "Directory" }, + BlinkCmpItemKindReference = { link = "Special" }, + BlinkCmpItemKindFolder = { link = "Directory" }, + BlinkCmpItemKindEnumMember = { link = "Constant" }, + BlinkCmpItemKindConstant = { link = "Constant" }, + BlinkCmpItemKindStruct = { link = "Type" }, + BlinkCmpItemKindEvent = { link = "Type" }, + BlinkCmpItemKindOperator = { link = "Operator" }, + BlinkCmpItemKindTypeParameter = { link = "Type" }, + BlinkCmpItemKindCopilot = { link = "String" }, + -- IndentBlankline IndentBlanklineChar = { fg = theme.ui.whitespace }, IndentBlanklineSpaceChar = { fg = theme.ui.whitespace }, From 0f27d73cb672ee48f013d56a9d297a5b338f5a83 Mon Sep 17 00:00:00 2001 From: WieeRd Date: Wed, 1 Jan 2025 22:07:29 +0900 Subject: [PATCH 2/3] fix: sync nvim-cmp and blink.cmp highlights with pmenu Changes suggested in https://github.com/rebelot/kanagawa.nvim/pull/263#pullrequestreview-2526838734 - Prefer using links to Pmenu groups. - Added missing `CmpGhostText` group. - Removed some misplaced whitespaces. - Did NOT change ghost texts and deprecated items to `NonText` since it might be just my personal preference. --- lua/kanagawa/highlights/plugins.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lua/kanagawa/highlights/plugins.lua b/lua/kanagawa/highlights/plugins.lua index d2fb7ca..f0533ec 100644 --- a/lua/kanagawa/highlights/plugins.lua +++ b/lua/kanagawa/highlights/plugins.lua @@ -146,7 +146,7 @@ function M.setup(colors, config) CmpDocumentation = { link = "NormalFloat" }, CmpDocumentationBorder = { link = "FloatBorder" }, CmpCompletion = { link = "Pmenu" }, - CmpCompletionSel = { fg = "NONE", bg = theme.ui.pmenu.bg_sel }, + CmpCompletionSel = { link = "PmenuSel" }, CmpCompletionBorder = { fg = theme.ui.bg_search, bg = theme.ui.pmenu.bg }, CmpCompletionThumb = { link = "PmenuThumb" }, CmpCompletionSbar = { link = "PmenuSbar" }, @@ -156,6 +156,7 @@ function M.setup(colors, config) CmpItemAbbrMatchFuzzy = { link = "CmpItemAbbrMatch" }, CmpItemKindDefault = { fg = theme.ui.fg_dim }, CmpItemMenu = { fg = theme.ui.fg_dim }, + CmpGhostText = { fg = theme.syn.comment }, CmpItemKindText = { fg = theme.ui.fg }, CmpItemKindMethod = { link = "@function.method" }, @@ -185,20 +186,21 @@ function M.setup(colors, config) CmpItemKindCopilot = { link = "String" }, -- blink.cmp - BlinkCmpMenu = { link = "Pmenu" }, - BlinkCmpMenuSelection = { fg = "NONE", bg = theme.ui.pmenu.bg_sel }, + BlinkCmpMenu = { link = "Pmenu" }, + BlinkCmpMenuSelection = { link = "PmenuSel" }, BlinkCmpMenuBorder = { fg = theme.ui.bg_search, bg = theme.ui.pmenu.bg }, BlinkCmpScrollBarThumb = { link = "PmenuThumb" }, - BlinkCmpScrollBarGutter = {link = "PmenuSbar" }, + BlinkCmpScrollBarGutter = { link = "PmenuSbar" }, BlinkCmpLabel = { fg = theme.ui.pmenu.fg }, BlinkCmpLabelMatch = { fg = theme.syn.fun }, + BlinkCmpLabelDetails = { fg = theme.syn.comment }, BlinkCmpLabelDeprecated = { fg = theme.syn.comment, strikethrough = true }, BlinkCmpGhostText = { fg = theme.syn.comment }, - BlinkCmpDoc = { link = "NormalFloat" }, + BlinkCmpDoc = { link = "NormalFloat" }, BlinkCmpDocBorder = { link = "FloatBorder" }, BlinkCmpDocCursorLine = { link = "Visual"}, - BlinkCmpSignatureHelp = { link = "NormalFloat" }, - BlinkCmpSignatureHelpBorder = { link = "FloatBorder" }, + BlinkCmpSignatureHelp = { link = "NormalFloat" }, + BlinkCmpSignatureHelpBorder = { link = "FloatBorder" }, BlinkCmpSignatureHelpActiveParameter = { link = "LspSignatureActiveParameter"}, BlinkCmpItemKindText = { fg = theme.ui.fg }, From 19d9f23556d264b5721e04035709acdb20599904 Mon Sep 17 00:00:00 2001 From: WieeRd Date: Wed, 1 Jan 2025 22:31:05 +0900 Subject: [PATCH 3/3] fix: correct blink.cmp completion kind highlights --- lua/kanagawa/highlights/plugins.lua | 53 +++++++++++++++-------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/lua/kanagawa/highlights/plugins.lua b/lua/kanagawa/highlights/plugins.lua index f0533ec..55ad13f 100644 --- a/lua/kanagawa/highlights/plugins.lua +++ b/lua/kanagawa/highlights/plugins.lua @@ -203,32 +203,33 @@ function M.setup(colors, config) BlinkCmpSignatureHelpBorder = { link = "FloatBorder" }, BlinkCmpSignatureHelpActiveParameter = { link = "LspSignatureActiveParameter"}, - BlinkCmpItemKindText = { fg = theme.ui.fg }, - BlinkCmpItemKindMethod = { link = "@function.method" }, - BlinkCmpItemKindFunction = { link = "Function" }, - BlinkCmpItemKindConstructor = { link = "@constructor" }, - BlinkCmpItemKindField = { link = "@variable.member" }, - BlinkCmpItemKindVariable = { fg = theme.ui.fg_dim }, - BlinkCmpItemKindClass = { link = "Type" }, - BlinkCmpItemKindInterface = { link = "Type" }, - BlinkCmpItemKindModule = { link = "@module" }, - BlinkCmpItemKindProperty = { link = "@property" }, - BlinkCmpItemKindUnit = { link = "Number" }, - BlinkCmpItemKindValue = { link = "String" }, - BlinkCmpItemKindEnum = { link = "Type" }, - BlinkCmpItemKindKeyword = { link = "Keyword" }, - BlinkCmpItemKindSnippet = { link = "Special" }, - BlinkCmpItemKindColor = { link = "Special" }, - BlinkCmpItemKindFile = { link = "Directory" }, - BlinkCmpItemKindReference = { link = "Special" }, - BlinkCmpItemKindFolder = { link = "Directory" }, - BlinkCmpItemKindEnumMember = { link = "Constant" }, - BlinkCmpItemKindConstant = { link = "Constant" }, - BlinkCmpItemKindStruct = { link = "Type" }, - BlinkCmpItemKindEvent = { link = "Type" }, - BlinkCmpItemKindOperator = { link = "Operator" }, - BlinkCmpItemKindTypeParameter = { link = "Type" }, - BlinkCmpItemKindCopilot = { link = "String" }, + BlinkCmpKind = { fg = theme.ui.fg_dim }, + BlinkCmpKindText = { fg = theme.ui.fg }, + BlinkCmpKindMethod = { link = "@function.method" }, + BlinkCmpKindFunction = { link = "Function" }, + BlinkCmpKindConstructor = { link = "@constructor" }, + BlinkCmpKindField = { link = "@variable.member" }, + BlinkCmpKindVariable = { fg = theme.ui.fg_dim }, + BlinkCmpKindClass = { link = "Type" }, + BlinkCmpKindInterface = { link = "Type" }, + BlinkCmpKindModule = { link = "@module" }, + BlinkCmpKindProperty = { link = "@property" }, + BlinkCmpKindUnit = { link = "Number" }, + BlinkCmpKindValue = { link = "String" }, + BlinkCmpKindEnum = { link = "Type" }, + BlinkCmpKindKeyword = { link = "Keyword" }, + BlinkCmpKindSnippet = { link = "Special" }, + BlinkCmpKindColor = { link = "Special" }, + BlinkCmpKindFile = { link = "Directory" }, + BlinkCmpKindReference = { link = "Special" }, + BlinkCmpKindFolder = { link = "Directory" }, + BlinkCmpKindEnumMember = { link = "Constant" }, + BlinkCmpKindConstant = { link = "Constant" }, + BlinkCmpKindStruct = { link = "Type" }, + BlinkCmpKindEvent = { link = "Type" }, + BlinkCmpKindOperator = { link = "Operator" }, + BlinkCmpKindTypeParameter = { link = "Type" }, + BlinkCmpKindCopilot = { link = "String" }, -- IndentBlankline IndentBlanklineChar = { fg = theme.ui.whitespace },