From d71471151b8906155e048ea3d3fe2fa7d651990e Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:51:25 -0800 Subject: [PATCH] fix(supermaven): blink.cmp integration (#4941) ## Description Supermaven completion now works with the latest release of blink.cmp and blink.compat. I'll also take a look at the other ai extras soon. ~A draft for now, until some issues with ghost text are resolved, see https://github.com/Saghen/blink.cmp/issues/257. Alternatively, enabling the supermaven extra could disable ghost text.~ ## Screenshots ![image](https://github.com/user-attachments/assets/feb8003d-85c5-49a4-80df-7f57b240d371) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/supermaven.lua | 29 ++++---------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index 7ecfd0b5..eaabdd66 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -44,38 +44,19 @@ return { }, -- blink.cmp integration - -- - -- FIXME: this currently doesn't work properly - -- { - -- "saghen/blink.cmp", - -- optional = true, - -- opts = { - -- sources = { - -- compat = vim.g.ai_cmp and { "supermaven" } or nil, - -- }, - -- }, - -- dependencies = { - -- "supermaven-nvim", - -- vim.g.ai_cmp and "saghen/blink.compat" or nil, - -- }, - -- }, - -- - -- Disabble cmp integration for now { "saghen/blink.cmp", optional = true, ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { - completion = { ghost_text = { enabled = false } }, + sources = { + compat = vim.g.ai_cmp and { "supermaven" } or nil, + }, }, dependencies = { - { - "supermaven-nvim", - opts = { - disable_inline_completion = false, - }, - }, + "supermaven-nvim", + vim.g.ai_cmp and "saghen/blink.compat" or nil, }, },