replace gen.nvim with avante.nvim

This commit is contained in:
2024-09-27 23:51:56 +05:30
parent c0298b5de3
commit cf9da7869b
3 changed files with 42 additions and 14 deletions

View File

@ -0,0 +1,30 @@
local opts = {
provider = "ollama",
vendors = {
ollama = {
["local"] = true,
endpoint = "100.64.0.1:11434/v1",
model = "deepseek-coder-v2",
parse_curl_args = function(opts, code_opts)
return {
url = opts.endpoint .. "/chat/completions",
headers = {
["Accept"] = "application/json",
["Content-Type"] = "application/json",
},
body = {
model = opts.model,
messages = require("avante.providers").copilot.parse_message(code_opts),
max_tokens = 2048,
stream = true,
},
}
end,
parse_response_data = function(data_stream, event_state, opts)
require("avante.providers").openai.parse_response(data_stream, event_state, opts)
end,
},
},
}
return opts

View File

@ -1,12 +0,0 @@
local opts = {
model = "deepseek-coder-v2:latest",
host = "100.64.0.1",
port = "11434",
display_mode = "split",
show_prompt = true,
show_model = true,
no_auto_close = false,
debug = false,
}
return opts

View File

@ -26,11 +26,21 @@ local plugins = {
},
},
{
"David-Kunz/gen.nvim",
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false,
build = "make",
opts = function()
return require("configs.gen")
return require("configs.avante")
end,
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
},
},
{
"Shatur/neovim-session-manager",