adds avante.nvim config

This commit is contained in:
Bogdan Buduroiu 2025-01-15 00:00:17 +08:00
parent fc6b1e5fe5
commit b4e5e444bb
Signed by: bruvduroiu
GPG key ID: A8722B2334DE9499
2 changed files with 197 additions and 139 deletions

View file

@ -0,0 +1,14 @@
return {
provider = "openrouter", -- Recommend using Claude
vendors = {
["openrouter"] = {
__inherited_from = "openai",
endpoint = "https://openrouter.ai/api/v1",
api_key_name = "OPENROUTER_API_KEY_AVANTE",
model = "anthropic/claude-3.5-sonnet",
temperature = 0,
max_tokens = 4096,
},
},
auto_suggestions_provider = "copilot", -- Since auto-suggestions are a high-frequency operation and therefore expensive, it is recommended to specify an inexpensive provider or even a free provider: copilot
}

View file

@ -1,143 +1,187 @@
return { return {
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
event = "BufWritePre", -- uncomment for format on save event = "BufWritePre", -- uncomment for format on save
opts = require "configs.conform", opts = require("configs.conform"),
}, },
-- These are some examples, uncomment them if you want to see them work! -- These are some examples, uncomment them if you want to see them work!
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
config = function() config = function()
require "configs.lspconfig" require("configs.lspconfig")
end, end,
}, },
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = { opts = {
ensure_installed = { ensure_installed = {
"vim", "vim",
"lua", "lua",
"vimdoc", "vimdoc",
"html", "html",
"css", "css",
"python", "python",
"typescript", "typescript",
"go", "go",
}, },
}, },
}, },
{ {
"tpope/vim-fugitive", "tpope/vim-fugitive",
cmd = { "Git", "G", "Gdiffsplit", "Gvdiffsplit", "Gwrite", "Gread", "Ggrep", "GMove", "GDelete", "GBrowse" }, cmd = { "Git", "G", "Gdiffsplit", "Gvdiffsplit", "Gwrite", "Gread", "Ggrep", "GMove", "GDelete", "GBrowse" },
keys = { keys = {
{ "<leader>gs", "<cmd>vertical Git<cr>" }, { "<leader>gs", "<cmd>vertical Git<cr>" },
desc = "Open Fugitive", desc = "Open Fugitive",
}, },
opts = { opts = {
enabled = true, enabled = true,
}, },
dependencies = { dependencies = {
"tpope/vim-rhubarb", "tpope/vim-rhubarb",
}, },
}, },
{ "tpope/vim-rhubarb", opts = { enabled = true } }, { "tpope/vim-rhubarb", opts = { enabled = true } },
{ {
"folke/zen-mode.nvim", "folke/zen-mode.nvim",
cmd = "ZenMode", cmd = "ZenMode",
opts = { opts = {
plugins = { plugins = {
kitty = { kitty = {
enabled = true, enabled = true,
font = "+4", font = "+4",
}, },
}, },
}, },
}, },
{ {
"folke/trouble.nvim", "folke/trouble.nvim",
opts = { opts = {
auto_close = true, auto_close = true,
auto_open = false, auto_open = false,
warn_no_results = false, warn_no_results = false,
modes = { modes = {
symbols = { -- Configure symbols mode symbols = { -- Configure symbols mode
win = { win = {
type = "split", -- split window type = "split", -- split window
relative = "win", -- relative to current window relative = "win", -- relative to current window
position = "right", -- right side position = "left", -- right side
size = 0.15, -- 30% of the window size = 0.20, -- 30% of the window
}, },
}, },
}, },
}, -- for default options, refer to the configuration section for custom setup. }, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble", cmd = "Trouble",
keys = { keys = {
{ {
"<leader>xx", "<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>", "<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)", desc = "Diagnostics (Trouble)",
}, },
{ {
"<leader>xX", "<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)", desc = "Buffer Diagnostics (Trouble)",
}, },
{ {
"<leader>cs", "<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>", "<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)", desc = "Symbols (Trouble)",
}, },
{ {
"<leader>cl", "<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>", "<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)", desc = "LSP Definitions / references / ... (Trouble)",
}, },
{ {
"<leader>xL", "<leader>xL",
"<cmd>Trouble loclist toggle<cr>", "<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)", desc = "Location List (Trouble)",
}, },
{ {
"<leader>xQ", "<leader>xQ",
"<cmd>Trouble qflist toggle<cr>", "<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)", desc = "Quickfix List (Trouble)",
}, },
}, },
}, },
{ {
"folke/noice.nvim", "folke/noice.nvim",
event = "VeryLazy", event = "VeryLazy",
opts = { opts = {
lsp = { lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter** -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = { override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true, ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true, ["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
}, },
}, },
-- you can enable a preset for easier configuration -- you can enable a preset for easier configuration
presets = { presets = {
bottom_search = true, -- use a classic bottom cmdline for search bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help lsp_doc_border = false, -- add a border to hover docs and signature help
}, },
}, },
}, },
{ {
"knubie/vim-kitty-navigator", "knubie/vim-kitty-navigator",
enabled = true, enabled = true,
lazy = false, lazy = false,
build = { build = {
"cp ./*.py ~/.config/kitty/", "cp ./*.py ~/.config/kitty/",
}, },
}, },
{ {
"gfontenot/vim-xcode", "gfontenot/vim-xcode",
enabled = true, enabled = true,
}, },
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false, -- set this to "*" if you want to always pull the latest change, false to update on release
opts = require("configs.avante"),
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
"zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
{
-- Make sure to set this up properly if you have lazy=true
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
},
} }