Skip to content

Commit 3bbe11f

Browse files
committed
Add avante.nvim for AI
1 parent 5640d37 commit 3bbe11f

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

lua/custom/plugins/avante.lua

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
-- https://github.com/yetone/avante.nvim
2+
3+
return {
4+
'yetone/avante.nvim',
5+
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
6+
-- ⚠️ must add this setting! ! !
7+
build = 'make',
8+
event = 'VeryLazy',
9+
version = false, -- Never set this value to "*"! Never!
10+
---@module 'avante'
11+
---@type avante.Config
12+
opts = {
13+
-- add any opts here
14+
-- for example
15+
provider = 'claude',
16+
providers = {
17+
claude = {
18+
endpoint = 'https://api.anthropic.com',
19+
model = 'claude-sonnet-4-20250514',
20+
timeout = 30000, -- Timeout in milliseconds
21+
extra_request_body = {
22+
temperature = 0.75,
23+
max_tokens = 20480,
24+
},
25+
},
26+
openai = {
27+
endpoint = 'https://api.openai.com/v1',
28+
model = 'gpt-4o',
29+
timeout = 30000, -- Timeout in milliseconds
30+
extra_request_body = {
31+
temperature = 0,
32+
max_tokens = 8192,
33+
},
34+
},
35+
},
36+
},
37+
dependencies = {
38+
'nvim-lua/plenary.nvim',
39+
'MunifTanjim/nui.nvim',
40+
--- The below dependencies are optional,
41+
'echasnovski/mini.pick', -- for file_selector provider mini.pick
42+
'nvim-telescope/telescope.nvim', -- for file_selector provider telescope
43+
'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions
44+
'ibhagwan/fzf-lua', -- for file_selector provider fzf
45+
'stevearc/dressing.nvim', -- for input provider dressing
46+
'folke/snacks.nvim', -- for input provider snacks
47+
'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons
48+
'zbirenbaum/copilot.lua', -- for providers='copilot'
49+
{
50+
-- support for image pasting
51+
'HakonHarnes/img-clip.nvim',
52+
event = 'VeryLazy',
53+
opts = {
54+
-- recommended settings
55+
default = {
56+
embed_image_as_base64 = false,
57+
prompt_for_file_name = false,
58+
drag_and_drop = {
59+
insert_mode = true,
60+
},
61+
-- required for Windows users
62+
use_absolute_path = true,
63+
},
64+
},
65+
},
66+
{
67+
-- Make sure to set this up properly if you have lazy=true
68+
'MeanderingProgrammer/render-markdown.nvim',
69+
opts = {
70+
file_types = { 'markdown', 'Avante' },
71+
},
72+
ft = { 'markdown', 'Avante' },
73+
},
74+
},
75+
}

lua/lazy-plugins.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ require('lazy').setup({
6262
-- This is the easiest way to modularize your config.
6363
--
6464
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
65-
-- { import = 'custom.plugins' },
65+
{ import = 'custom.plugins' },
6666
--
6767
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
6868
-- Or use telescope!

0 commit comments

Comments
 (0)