✨ feat(nvim): new ai extras: neocodeium and avante
This commit is contained in:
parent
2c5ec6ccea
commit
812e1e3b66
2 changed files with 61 additions and 0 deletions
23
.config/nvim/lua/plugins/extras/coding/ai/avante.lua
Normal file
23
.config/nvim/lua/plugins/extras/coding/ai/avante.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
{
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
build = "make",
|
||||
opts = {
|
||||
openai = {
|
||||
endpoint = "http://127.0.0.1:11434",
|
||||
model = "deepseek-coder-v2",
|
||||
temperature = 60,
|
||||
max_tokens = 4096,
|
||||
["local"] = true,
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {
|
||||
file_types = { "markdown", "norg", "rmd", "org", "Avante" },
|
||||
},
|
||||
ft = { "markdown", "norg", "rmd", "org", "Avante" },
|
||||
},
|
||||
},
|
||||
}
|
38
.config/nvim/lua/plugins/extras/coding/ai/neocodeium.lua
Normal file
38
.config/nvim/lua/plugins/extras/coding/ai/neocodeium.lua
Normal file
|
@ -0,0 +1,38 @@
|
|||
return {
|
||||
"monkoose/neocodeium",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local neocodeium = require("neocodeium")
|
||||
neocodeium.setup()
|
||||
|
||||
local commands = require("neocodeium.commands")
|
||||
cmp.event:on("menu_opened", function()
|
||||
commands.disable()
|
||||
neocodeium.clear()
|
||||
end)
|
||||
|
||||
cmp.event:on("menu_closed", function()
|
||||
commands.enable()
|
||||
end)
|
||||
|
||||
vim.keymap.set("i", "<M-CR>", function()
|
||||
require("neocodeium").accept()
|
||||
end)
|
||||
vim.keymap.set("i", "<A-w>", function()
|
||||
require("neocodeium").accept_word()
|
||||
end)
|
||||
vim.keymap.set("i", "<A-a>", function()
|
||||
require("neocodeium").accept_line()
|
||||
end)
|
||||
vim.keymap.set("i", "<M-]>", function()
|
||||
require("neocodeium").cycle_or_complete()
|
||||
end)
|
||||
vim.keymap.set("i", "<M-[>", function()
|
||||
require("neocodeium").cycle_or_complete(-1)
|
||||
end)
|
||||
vim.keymap.set("i", "<M-c>", function()
|
||||
require("neocodeium").clear()
|
||||
end)
|
||||
end,
|
||||
}
|
Loading…
Add table
Reference in a new issue