mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-17 17:23:24 +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,
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue