Intgration with blink.cmp #142

Open
opened 2025-06-21 17:11:21 -04:00 by ayoubelmhamdi · 1 comment
ayoubelmhamdi commented 2025-06-21 17:11:21 -04:00 (Migrated from github.com)

Four things should be easy to setup for integration between any AI completion plugin and cmp engine, like: blink.cmp.

The AI plugins should be collaborated which other to provide a simple interface with these features:

  • Virtual line support.
  • Multiline (could be turned on/off easily).
  • Handling AI alternative suggestions as additional items in the blink.cmp list
  • Accepting full/line/word completions

These features allow users to easily choose their preferred options without forcing reliance solely on AI completion or plugins, which is common in current implementations.

for me, i hate the competion menu at all, and multiline in major of times, for two reason, i want to memorize my code and prevent annoying text or popup and use big font as available without thinking about suggestion.

my blink.cmp with supermaven config:

return {
    'saghen/blink.cmp',
    dependencies = {
        {
            "supermaven-inc/supermaven-nvim",
            dependencies ={ "huijiro/blink-cmp-supermaven", },
            opts = {
                -- @NOTE: the comment bellow say: only cmp (not blink.cmp) can handle the inline completion for now if disable on supermaven-nvim and maybe wrong comment.
				disable_inline_completion = true, -- disables inline completion for use with cmp
				disable_keymaps = false, -- disables built in keymaps for more manual control with blink.cmp
                keymaps = {
                    accept_suggestion = nil,
                    clear_suggestion = nil,
                    accept_word = "<C-f>",
                }
            },
        },
    },
    opts = {
        keymap = {
            preset = 'default',
            ['<C-y>'] = { 'hide' }, 
            ['<C-e>'] = { 'select_and_accept' }, -- my brain always think <C-E> meke me to go to the end of line like bash, 
        },
        completion = {
            menu = { auto_show = false },
            ghost_text = {
                show_with_menu = false,
                enabled = true
            }
        }, -- end completion
        sources = {
            default = { 'lsp','supermaven', 'path'},
            providers = {
				supermaven = {
					name = "supermaven",
					module = "blink-cmp-supermaven",
					async = true,
				},
            },
        }, -- end sources
    },
}

i patch the upermaven-nvim to use:

  • accept_word from supermaven-nvim
  • accept full completion from blink.cmp
diff --git a/lua/supermaven-nvim/init.lua b/lua/supermaven-nvim/init.lua
index c9b8b0b..a537f3a 100644
--- a/lua/supermaven-nvim/init.lua
+++ b/lua/supermaven-nvim/init.lua
@@ -11,7 +11,9 @@ M.setup = function(args)
 
   if config.disable_inline_completion then
     completion_preview.disable_inline_completion = true
-  elseif not config.disable_keymaps then
+  end
+
+  if true then
     if config.keymaps.accept_suggestion ~= nil then
       local accept_suggestion_key = config.keymaps.accept_suggestion
       vim.keymap.set(

and i do not know way it's work!!.

Four things should be easy to setup for integration between any AI completion plugin and cmp engine, like: [blink.cmp](https://github.com/supermaven-inc/supermaven-nvim). The AI plugins should be collaborated which other to provide a simple interface with these features: - Virtual line support. - Multiline (could be turned on/off easily). - Handling AI alternative suggestions as additional items in the blink.cmp list - Accepting full/line/word completions These features allow users to easily choose their preferred options without forcing reliance solely on AI completion or plugins, which is common in current implementations. for me, i hate the `competion menu` at all, and multiline in major of times, for two reason, i want to memorize my code and prevent annoying text or popup and use big font as available without thinking about suggestion. my `blink.cmp` with `supermaven` config: ```lua return { 'saghen/blink.cmp', dependencies = { { "supermaven-inc/supermaven-nvim", dependencies ={ "huijiro/blink-cmp-supermaven", }, opts = { -- @NOTE: the comment bellow say: only cmp (not blink.cmp) can handle the inline completion for now if disable on supermaven-nvim and maybe wrong comment. disable_inline_completion = true, -- disables inline completion for use with cmp disable_keymaps = false, -- disables built in keymaps for more manual control with blink.cmp keymaps = { accept_suggestion = nil, clear_suggestion = nil, accept_word = "<C-f>", } }, }, }, opts = { keymap = { preset = 'default', ['<C-y>'] = { 'hide' }, ['<C-e>'] = { 'select_and_accept' }, -- my brain always think <C-E> meke me to go to the end of line like bash, }, completion = { menu = { auto_show = false }, ghost_text = { show_with_menu = false, enabled = true } }, -- end completion sources = { default = { 'lsp','supermaven', 'path'}, providers = { supermaven = { name = "supermaven", module = "blink-cmp-supermaven", async = true, }, }, }, -- end sources }, } ``` i patch the upermaven-nvim to use: - `accept_word` from `supermaven-nvim` - `accept full completion` from `blink.cmp` ```diff diff --git a/lua/supermaven-nvim/init.lua b/lua/supermaven-nvim/init.lua index c9b8b0b..a537f3a 100644 --- a/lua/supermaven-nvim/init.lua +++ b/lua/supermaven-nvim/init.lua @@ -11,7 +11,9 @@ M.setup = function(args) if config.disable_inline_completion then completion_preview.disable_inline_completion = true - elseif not config.disable_keymaps then + end + + if true then if config.keymaps.accept_suggestion ~= nil then local accept_suggestion_key = config.keymaps.accept_suggestion vim.keymap.set( ``` and i do not know way it's work!!.
VesperQuartz commented 2025-07-22 04:34:48 -04:00 (Migrated from github.com)

How to add icons for supermaven?

How to add icons for supermaven?
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
supermaven-inc/supermaven-nvim#142
No description provided.