mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-13 10:54:40 +02:00
Merge 17ee28dc4a
into 25abbf546d
This commit is contained in:
commit
c4cb6e3e92
2 changed files with 18 additions and 8 deletions
|
@ -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,
|
||||
},
|
||||
|
||||
|
|
|
@ -88,6 +88,10 @@ return {
|
|||
keymap = {
|
||||
preset = "enter",
|
||||
["<C-y>"] = { "select_and_accept" },
|
||||
["<S-Tab>"] = {
|
||||
LazyVim.cmp.map({ "snippet_backward", "ai_accept_word" }),
|
||||
"fallback",
|
||||
},
|
||||
},
|
||||
},
|
||||
---@param opts blink.cmp.Config | { sources: { compat: string[] } }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue