diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index 5d30f49c..1935ade4 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -20,16 +20,22 @@ return { "supermaven-inc/supermaven-nvim", opts = function() require("supermaven-nvim.completion_preview").suggestion_group = "SupermavenSuggestion" - LazyVim.cmp.actions.ai_accept = function() - local suggestion = require("supermaven-nvim.completion_preview") - if suggestion.has_suggestion() then - LazyVim.create_undo() - vim.schedule(function() - suggestion.on_accept_suggestion() - end) - return true + + local ai_accept = function(partial) + return function() + local suggestion = require("supermaven-nvim.completion_preview") + if suggestion.has_suggestion() then + LazyVim.create_undo() + vim.schedule(function() + suggestion.on_accept_suggestion(partial) + end) + return true + end end end + + LazyVim.cmp.actions.ai_accept = ai_accept(false) + LazyVim.cmp.actions.ai_accept_word = ai_accept(true) end, }, diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 45e393e1..0a09453c 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -85,6 +85,10 @@ return { keymap = { preset = "enter", [""] = { "select_and_accept" }, + [""] = { + LazyVim.cmp.map({ "snippet_backward", "ai_accept_word" }), + "fallback", + }, }, }, ---@param opts blink.cmp.Config | { sources: { compat: string[] } }