diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index 6d2646a1..aa0b72cc 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -55,17 +55,32 @@ return { end, }, - { + vim.g.ai_cmp and { "saghen/blink.cmp", optional = true, + dependencies = { "codeium.nvim", "saghen/blink.compat" }, opts = { sources = { - compat = vim.g.ai_cmp and { "codeium" } or nil, + compat = { "codeium" }, + }, + completion = { + menu = { + draw = { + components = { + kind = { + text = function(ctx) + return ctx.source_name == "codeium" and "Codeium" or ctx.kind + end, + highlight = function(ctx) + return ctx.source_name == "codeium" and "BlinkCmpKindCodeium" + or require("blink.cmp.completion.windows.render.tailwind").get_hl(ctx) + or ("BlinkCmpKind" .. ctx.kind) + end, + }, + }, + }, + }, }, }, - dependencies = { - "codeium.nvim", - vim.g.ai_cmp and "saghen/blink.compat" or nil, - }, - }, + } or nil, } diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 4fd3119c..1f9108e5 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -94,31 +94,37 @@ return { }, }, - -- blink.cmp - { + vim.g.ai_cmp and { "saghen/blink.cmp", optional = true, - dependencies = { - { - "giuxtaposition/blink-cmp-copilot", - enabled = vim.g.ai_cmp, -- only enable if needed - specs = { - { - "blink.cmp", - optional = true, - opts = { - sources = { - providers = { - copilot = { name = "copilot", module = "blink-cmp-copilot" }, - }, - completion = { - enabled_providers = { "copilot" }, - }, + dependencies = { "giuxtaposition/blink-cmp-copilot" }, + opts = { + sources = { + completion = { + enabled_providers = { "copilot" }, + }, + providers = { + copilot = { name = "copilot", module = "blink-cmp-copilot" }, + }, + }, + completion = { + menu = { + draw = { + components = { + kind = { + text = function(ctx) + return ctx.source_name == "copilot" and "Copilot" or ctx.kind + end, + highlight = function(ctx) + return ctx.source_name == "copilot" and "BlinkCmpKindCopilot" + or require("blink.cmp.completion.windows.render.tailwind").get_hl(ctx) + or ("BlinkCmpKind" .. ctx.kind) + end, }, }, }, }, }, }, - }, + } or nil, } diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index eaabdd66..fbd60295 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -43,22 +43,34 @@ return { end, }, - -- blink.cmp integration - { + vim.g.ai_cmp and { "saghen/blink.cmp", optional = true, - ---@module 'blink.cmp' - ---@type blink.cmp.Config + dependencies = { "supermaven-nvim", "saghen/blink.compat" }, opts = { sources = { - compat = vim.g.ai_cmp and { "supermaven" } or nil, + compat = { "supermaven" }, + }, + completion = { + menu = { + draw = { + components = { + kind = { + text = function(ctx) + return ctx.source_name == "supermaven" and "Supermaven" or ctx.kind + end, + highlight = function(ctx) + return ctx.source_name == "supermaven" and "BlinkCmpKindSupermaven" + or require("blink.cmp.completion.windows.render.tailwind").get_hl(ctx) + or ("BlinkCmpKind" .. ctx.kind) + end, + }, + }, + }, + }, }, }, - dependencies = { - "supermaven-nvim", - vim.g.ai_cmp and "saghen/blink.compat" or nil, - }, - }, + } or nil, { "nvim-lualine/lualine.nvim", diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index a4554f30..85348438 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -52,7 +52,7 @@ return { auto_show_delay_ms = 200, }, ghost_text = { - enabled = vim.g.ai_cmp, + enabled = true, }, },