Install avante

This commit is contained in:
Thomas Avé 2025-03-19 23:23:56 +01:00
parent aa12709581
commit bdfd19b895
3 changed files with 46 additions and 24 deletions

View File

@ -0,0 +1,37 @@
return {
"yetone/avante.nvim",
event = "VeryLazy",
version = false, -- Set this to "*" to always pull the latest release version, or set it to false to update to the latest code changes.
opts = {
provider = "copilot",
-- cursor_applying_provider = 'ollama',
copilot = {
model = "claude-3.5-sonnet"
},
ollama = {
model = "llama3.2:1b"
},
behaviour = {
enable_cursor_planning_mode = false, -- enable cursor planning mode!
}
},
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "nix-shell -p cmake --command make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- Make sure to set this up properly if you have lazy=true
'MeanderingProgrammer/render-markdown.nvim',
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
}

View File

@ -17,7 +17,8 @@ return {
'neovim/nvim-lspconfig',
'williamboman/mason-lspconfig.nvim',
"rcarriga/cmp-dap",
"mfussenegger/nvim-dap"
"mfussenegger/nvim-dap",
'Kaiser-Yang/blink-cmp-avante',
},
build = 'nix run --extra-experimental-features flakes --extra-experimental-features nix-command .#build-plugin',
keys = {
@ -53,33 +54,17 @@ return {
if is_dap_buffer() then
return { "dap", "snippets", "buffer" }
else
return { "lsp", "path", "snippets", "buffer" }
return { "avante", "lsp", "path", "snippets", "buffer" }
end
end,
-- transform_items = function(_, items)
-- for _, item in ipairs(items) do
-- local types = require('blink.cmp.types')
-- local map = {}
-- map[types.CompletionItemKind.Text] = -3
-- map[types.CompletionItemKind.Method] = 10
-- map[types.CompletionItemKind.Function] = 9
-- map[types.CompletionItemKind.Field] = 8
-- map[types.CompletionItemKind.Class] = 7
-- map[types.CompletionItemKind.Variable] = 6
-- map[types.CompletionItemKind.Property] = 5
--
-- if map[item.kind] ~= nil then
-- item.score_offset = item.score_offset + map[item.kind]
-- end
-- if item.label:match("^__") then
-- item.score_offset = item.score_offset - 3
-- end
-- end
-- return items
-- end,
providers = {
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
dap = { name = "dap", module = "blink.compat.source" },
avante = {
module = 'blink-cmp-avante',
name = 'Avante',
opts = { } -- options for blink-cmp-avante
}
},
},
completion = {

View File

@ -7,7 +7,7 @@ vim.opt.hidden = true
vim.opt.hlsearch = true
vim.opt.ignorecase = true
vim.opt.incsearch = true
vim.opt.laststatus = 2
vim.opt.laststatus = 3
vim.opt.lbr = true
vim.opt.modelines = 0
vim.opt.mouse = "a"