Install avante
This commit is contained in:
parent
aa12709581
commit
bdfd19b895
|
@ -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" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -17,7 +17,8 @@ return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
"rcarriga/cmp-dap",
|
"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',
|
build = 'nix run --extra-experimental-features flakes --extra-experimental-features nix-command .#build-plugin',
|
||||||
keys = {
|
keys = {
|
||||||
|
@ -53,33 +54,17 @@ return {
|
||||||
if is_dap_buffer() then
|
if is_dap_buffer() then
|
||||||
return { "dap", "snippets", "buffer" }
|
return { "dap", "snippets", "buffer" }
|
||||||
else
|
else
|
||||||
return { "lsp", "path", "snippets", "buffer" }
|
return { "avante", "lsp", "path", "snippets", "buffer" }
|
||||||
end
|
end
|
||||||
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 = {
|
providers = {
|
||||||
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
||||||
dap = { name = "dap", module = "blink.compat.source" },
|
dap = { name = "dap", module = "blink.compat.source" },
|
||||||
|
avante = {
|
||||||
|
module = 'blink-cmp-avante',
|
||||||
|
name = 'Avante',
|
||||||
|
opts = { } -- options for blink-cmp-avante
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
|
|
|
@ -7,7 +7,7 @@ vim.opt.hidden = true
|
||||||
vim.opt.hlsearch = true
|
vim.opt.hlsearch = true
|
||||||
vim.opt.ignorecase = true
|
vim.opt.ignorecase = true
|
||||||
vim.opt.incsearch = true
|
vim.opt.incsearch = true
|
||||||
vim.opt.laststatus = 2
|
vim.opt.laststatus = 3
|
||||||
vim.opt.lbr = true
|
vim.opt.lbr = true
|
||||||
vim.opt.modelines = 0
|
vim.opt.modelines = 0
|
||||||
vim.opt.mouse = "a"
|
vim.opt.mouse = "a"
|
||||||
|
|
Loading…
Reference in New Issue