lazy avante opts note
This commit is contained in:
parent
062a5e3f8f
commit
a4147ffafa
@ -1,99 +1,100 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"yetone/avante.nvim",
|
"yetone/avante.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
opts = {
|
opts = {
|
||||||
claude = {
|
-- Hack to make local LLM work smoothly. Breaks claude entirely.
|
||||||
["local"] = true,
|
claude = {
|
||||||
},
|
["local"] = true,
|
||||||
provider = "ollama",
|
},
|
||||||
vendors = {
|
provider = "ollama",
|
||||||
provider = "ollama",
|
vendors = {
|
||||||
---@type AvanteProvider
|
provider = "ollama",
|
||||||
ollama = {
|
---@type AvanteProvider
|
||||||
["local"] = true,
|
ollama = {
|
||||||
endpoint = "127.0.0.1:11434/v1",
|
["local"] = true,
|
||||||
model = "llama3.1",
|
endpoint = "127.0.0.1:11434/v1",
|
||||||
parse_curl_args = function(opts, code_opts)
|
model = "llama3.1",
|
||||||
return {
|
parse_curl_args = function(opts, code_opts)
|
||||||
url = opts.endpoint .. "/chat/completions",
|
return {
|
||||||
headers = {
|
url = opts.endpoint .. "/chat/completions",
|
||||||
["Accept"] = "application/json",
|
headers = {
|
||||||
["Content-Type"] = "application/json",
|
["Accept"] = "application/json",
|
||||||
},
|
["Content-Type"] = "application/json",
|
||||||
body = {
|
},
|
||||||
model = opts.model,
|
body = {
|
||||||
messages = require("avante.providers").copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced
|
model = opts.model,
|
||||||
max_tokens = 2048,
|
messages = require("avante.providers").copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced
|
||||||
stream = true,
|
max_tokens = 2048,
|
||||||
},
|
stream = true,
|
||||||
}
|
},
|
||||||
end,
|
}
|
||||||
parse_response_data = function(data_stream, event_state, opts)
|
end,
|
||||||
require("avante.providers").openai.parse_response(data_stream, event_state, opts)
|
parse_response_data = function(data_stream, event_state, opts)
|
||||||
end,
|
require("avante.providers").openai.parse_response(data_stream, event_state, opts)
|
||||||
},
|
end,
|
||||||
},
|
},
|
||||||
-- add any opts here
|
},
|
||||||
},
|
-- add any opts here
|
||||||
keys = {
|
},
|
||||||
{
|
keys = {
|
||||||
"<leader>aa",
|
{
|
||||||
function()
|
"<leader>aa",
|
||||||
require("avante.api").ask()
|
function()
|
||||||
end,
|
require("avante.api").ask()
|
||||||
desc = "avante: ask",
|
end,
|
||||||
mode = { "n", "v" },
|
desc = "avante: ask",
|
||||||
},
|
mode = { "n", "v" },
|
||||||
{
|
},
|
||||||
"<leader>ar",
|
{
|
||||||
function()
|
"<leader>ar",
|
||||||
require("avante.api").refresh()
|
function()
|
||||||
end,
|
require("avante.api").refresh()
|
||||||
desc = "avante: refresh",
|
end,
|
||||||
},
|
desc = "avante: refresh",
|
||||||
{
|
},
|
||||||
"<leader>ae",
|
{
|
||||||
function()
|
"<leader>ae",
|
||||||
require("avante.api").edit()
|
function()
|
||||||
end,
|
require("avante.api").edit()
|
||||||
desc = "avante: edit",
|
end,
|
||||||
mode = "v",
|
desc = "avante: edit",
|
||||||
},
|
mode = "v",
|
||||||
},
|
},
|
||||||
dependencies = {
|
},
|
||||||
"stevearc/dressing.nvim",
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"stevearc/dressing.nvim",
|
||||||
"MunifTanjim/nui.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
--- The below dependencies are optional,
|
"MunifTanjim/nui.nvim",
|
||||||
--"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
--- The below dependencies are optional,
|
||||||
"echasnovski/mini.icons",
|
--"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||||
{
|
"echasnovski/mini.icons",
|
||||||
-- support for image pasting
|
{
|
||||||
"HakonHarnes/img-clip.nvim",
|
-- support for image pasting
|
||||||
event = "VeryLazy",
|
"HakonHarnes/img-clip.nvim",
|
||||||
opts = {
|
event = "VeryLazy",
|
||||||
-- recommended settings
|
opts = {
|
||||||
default = {
|
-- recommended settings
|
||||||
embed_image_as_base64 = false,
|
default = {
|
||||||
prompt_for_file_name = false,
|
embed_image_as_base64 = false,
|
||||||
drag_and_drop = {
|
prompt_for_file_name = false,
|
||||||
insert_mode = true,
|
drag_and_drop = {
|
||||||
},
|
insert_mode = true,
|
||||||
-- required for Windows users
|
},
|
||||||
use_absolute_path = true,
|
-- required for Windows users
|
||||||
},
|
use_absolute_path = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
-- Make sure to setup it properly if you have lazy=true
|
{
|
||||||
"MeanderingProgrammer/render-markdown.nvim",
|
-- Make sure to setup it properly if you have lazy=true
|
||||||
opts = {
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
file_types = { "markdown", "Avante" },
|
opts = {
|
||||||
},
|
file_types = { "markdown", "Avante" },
|
||||||
ft = { "markdown", "Avante" },
|
},
|
||||||
},
|
ft = { "markdown", "Avante" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user