diff --git a/config/nvim/lua/custom/plugins/init.lua b/config/nvim/lua/custom/plugins/init.lua index 0fdfaa2..3b40caa 100644 --- a/config/nvim/lua/custom/plugins/init.lua +++ b/config/nvim/lua/custom/plugins/init.lua @@ -144,4 +144,124 @@ return { } end, }, + { + 'yetone/avante.nvim', + event = 'VeryLazy', + lazy = false, + version = false, + opts = { + provider = 'claude', + auto_suggestion_provider = 'claude', + claude = { + endpoint = 'https://api.anthropic.com', + model = 'claude-3-5-sonnet-20241022', + temperature = 0, + max_tokens = 4096, + }, + behaviour = { + auto_suggestions = false, + auto_set_highlight_group = true, + aute_set_keymaps = true, + auto_apply_diff_after_generation = true, + support_paste_from_clipboard = false, + minimize_diff = true, + }, + mappings = { + diff = { + ours = 'co', + theirs = 'ct', + all_theirs = 'ca', + both = 'cb', + cursor = 'cc', + next = ']x', + prev = '[x', + }, + suggestion = { + accept = '', + next = '', + prev = '', + dismiss = '', + }, + jump = { + next = ']]', + prev = '[[', + }, + submit = { + normal = '', + insert = '', + }, + sidebar = { + apply_all = 'A', + apply_cursor = 'a', + switch_windows = '', + reverse_switch_windows = '', + }, + }, + hints = { enabled = true }, + windows = { + position = 'right', + wrap = true, + width = 30, + sidebar_header = { + enabled = true, + align = 'center', + rounded = true, + }, + input = { + prefix = '> ', + height = 8, + }, + edit = { + border = 'rounded', + start_insert = true, + }, + ask = { + floating = false, + start_insert = true, + border = 'rounded', + focus_on_apply = 'ours', + }, + }, + highlights = { + diff = { + current = 'DiffText', + incoming = 'DiffAdd', + }, + }, + diff = { + autojump = true, + list_opener = 'copen', + override_timeoutlen = 500, + }, + }, + build = 'make', + dependencies = { + 'stevearc/dressing.nvim', + 'nvim-lua/plenary.nvim', + 'MunifTanjim/nui.nvim', + 'hrsh7th/nvim-cmp', + 'nvim-tree/nvim-web-devicons', + { + 'HakonHarnes/img-clip.nvim', + event = 'VeryLazy', + opts = { + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + use_absolute_path = true, + }, + }, + }, + { + 'MeanderingProgrammer/render-markdown.nvim', + opts = { + file_types = { 'markdown', 'Avante' }, + }, + ft = { 'markdown', 'Avante' }, + }, + }, + }, }