Supermaven
info
You can enable the extra with the :LazyExtras
command.
Plugins marked as optional will only be configured if they are installed.
Alternatively, you can add it to your lazy.nvim
imports
lua/config/lazy.lua
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.ai.supermaven" },
{ import = "plugins" },
},
})
Below you can find a list of included plugins and their default settings.
caution
You don't need to copy the default settings to your config. They are only shown here for reference.
supermaven-nvim
- Options
- Full Spec
opts = {
keymaps = {
accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp
},
disable_inline_completion = vim.g.ai_cmp,
}
{
"supermaven-inc/supermaven-nvim",
opts = {
keymaps = {
accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp
},
disable_inline_completion = vim.g.ai_cmp,
},
}
supermaven-nvim
add ai_accept action
- Options
- Full Spec
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
end
end
end
{
"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
end
end
end,
}
supermaven-nvim
- Options
- Full Spec
opts = nil
{ "supermaven-nvim" }
supermaven-nvim
- Options
- Full Spec
opts = {
disable_inline_completion = false,
}
{
"supermaven-nvim",
opts = {
disable_inline_completion = false,
},
}
nvim-cmp (optional)
cmp integration
- Options
- Full Spec
opts = function(_, opts)
if vim.g.ai_cmp then
table.insert(opts.sources, 1, {
name = "supermaven",
group_index = 1,
priority = 100,
})
end
end
{
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { "supermaven-nvim" },
opts = function(_, opts)
if vim.g.ai_cmp then
table.insert(opts.sources, 1, {
name = "supermaven",
group_index = 1,
priority = 100,
})
end
end,
}
blink.cmp (optional)
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
- Options
- Full Spec
opts = {
windows = { ghost_text = { enabled = false } },
}
{
"saghen/blink.cmp",
optional = true,
opts = {
windows = { ghost_text = { enabled = false } },
},
dependencies = {
{
"supermaven-nvim",
opts = {
disable_inline_completion = false,
},
},
},
}
lualine.nvim (optional)
- Options
- Full Spec
opts = function(_, opts)
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("supermaven"))
end
{
"nvim-lualine/lualine.nvim",
optional = true,
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("supermaven"))
end,
}
noice.nvim (optional)
- Options
- Full Spec
opts = function(_, opts)
vim.list_extend(opts.routes, {
{
filter = {
event = "msg_show",
any = {
{ find = "Starting Supermaven" },
{ find = "Supermaven Free Tier" },
},
},
skip = true,
},
})
end
{
"folke/noice.nvim",
optional = true,
opts = function(_, opts)
vim.list_extend(opts.routes, {
{
filter = {
event = "msg_show",
any = {
{ find = "Starting Supermaven" },
{ find = "Supermaven Free Tier" },
},
},
skip = true,
},
})
end,
}