···11+-- Bootstrap lazy.nvim
22+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
33+if not (vim.uv or vim.loop).fs_stat(lazypath) then
44+ local lazyrepo = "https://github.com/folke/lazy.nvim.git"
55+ local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
66+ if vim.v.shell_error ~= 0 then
77+ vim.api.nvim_echo({
88+ { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
99+ { out, "WarningMsg" },
1010+ { "\nPress any key to exit..." },
1111+ }, true, {})
1212+ vim.fn.getchar()
1313+ os.exit(1)
1414+ end
1515+end
1616+vim.opt.rtp:prepend(lazypath)
1717+1818+-- Make sure to setup `mapleader` and `maplocalleader` before
1919+-- loading lazy.nvim so that mappings are correct.
2020+-- This is also a good place to setup other settings (vim.opt)
2121+vim.g.mapleader = " "
2222+vim.g.maplocalleader = "\\"
2323+2424+-- Setup lazy.nvim
2525+require("lazy").setup({
2626+ spec = {
2727+ -- import your plugins
2828+ { import = "plugins" },
2929+ },
3030+ -- Configure any other settings here. See the documentation for more details.
3131+ -- colorscheme that will be used when installing plugins.
3232+ install = { colorscheme = { "rose-pine" } },
3333+ -- automatically check for plugin updates
3434+ checker = { enabled = true },
3535+})
+48
nvim/lua/plugins/avante.lua
···11+return {
22+ "yetone/avante.nvim",
33+ event = "VeryLazy",
44+ lazy = false,
55+ version = false, -- set this if you want to always pull the latest change
66+ opts = {
77+ -- add any opts here
88+ },
99+ -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
1010+ build = "make",
1111+ -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
1212+ dependencies = {
1313+ "nvim-treesitter/nvim-treesitter",
1414+ "stevearc/dressing.nvim",
1515+ "nvim-lua/plenary.nvim",
1616+ "MunifTanjim/nui.nvim",
1717+ --- The below dependencies are optional,
1818+ "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
1919+ "zbirenbaum/copilot.lua", -- for providers='copilot'
2020+ {
2121+ -- support for image pasting
2222+ "HakonHarnes/img-clip.nvim",
2323+ event = "VeryLazy",
2424+ opts = {
2525+ -- recommended settings
2626+ default = {
2727+ provider = "openai",
2828+ auto_suggestions_provider = "copilot",
2929+ embed_image_as_base64 = false,
3030+ prompt_for_file_name = false,
3131+ drag_and_drop = {
3232+ insert_mode = true,
3333+ },
3434+ -- required for Windows users
3535+ use_absolute_path = true,
3636+ },
3737+ },
3838+ },
3939+ {
4040+ -- Make sure to set this up properly if you have lazy=true
4141+ 'MeanderingProgrammer/render-markdown.nvim',
4242+ opts = {
4343+ file_types = { "markdown", "Avante" },
4444+ },
4545+ ft = { "markdown", "Avante" },
4646+ },
4747+ },
4848+}