diff --git a/home/base/tui/editors/neovim/nvim/lazy-lock.json b/home/base/tui/editors/neovim/nvim/lazy-lock.json index 5745fcb1..a1216de9 100644 --- a/home/base/tui/editors/neovim/nvim/lazy-lock.json +++ b/home/base/tui/editors/neovim/nvim/lazy-lock.json @@ -12,7 +12,6 @@ "astroui": { "branch": "main", "commit": "e923a84c488d879a260fc9cfb2dc27dd870fb6ac" }, "autosave.nvim": { "branch": "main", "commit": "348f72cf0241e3e736e3396c4834def2f8ef8d10" }, "avante.nvim": { "branch": "main", "commit": "54a1df28b67a97e0f05ad33808bea6c1abae7ea9" }, - "blink-cmp-avante": { "branch": "master", "commit": "bea97a08fe66cef0f93e953f908a4d00b0eca6b2" }, "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, "clangd_extensions.nvim": { "branch": "main", @@ -32,11 +31,13 @@ "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, "flit.nvim": { "branch": "main", "commit": "1ef72de6a02458d31b10039372c8a15ab8989e0d" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "fzf-lua": { "branch": "main", "commit": "b62a34f5e4fbf36dd4c6d29920a61451eecd04ed" }, "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, "gopher.nvim": { "branch": "main", "commit": "9db5931af1293ae52500921d92c02145d86df02c" }, "goto-preview": { "branch": "main", "commit": "d1faf6ea992b5bcaaaf2c682e1aba3131a01143e" }, "guess-indent.nvim": { "branch": "main", "commit": "6cd61f7a600bb756e558627cd2e740302c58e32d" }, "heirline.nvim": { "branch": "master", "commit": "cc359b628266cb9a84b2d71c883f2b99e16473a0" }, + "img-clip.nvim": { "branch": "main", "commit": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" @@ -110,6 +111,10 @@ "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" }, "refactoring.nvim": { "branch": "master", "commit": "2be7ea3f10b7e59658f5abf6dffc50b5d61964d6" }, + "render-markdown.nvim": { + "branch": "main", + "commit": "a2c2493c21cf61e5554ee8bc83da75bd695921da" + }, "resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" }, "rustaceanvim": { "branch": "master", "commit": "3f327d15a3c1ed48b1e1087e16873a28a39768c2" }, "sentiment.nvim": { "branch": "main", "commit": "54a6db15b630eccfa98c32a76baf90f21c6f1e40" }, diff --git a/home/base/tui/editors/neovim/nvim/lua/community.lua b/home/base/tui/editors/neovim/nvim/lua/community.lua index 3bdfc370..de3c7d05 100644 --- a/home/base/tui/editors/neovim/nvim/lua/community.lua +++ b/home/base/tui/editors/neovim/nvim/lua/community.lua @@ -52,6 +52,4 @@ return { -- Lua implementation of CamelCaseMotion, with extra consideration of punctuation. { import = "astrocommunity.motion.nvim-spider" }, - -- AI Assistant - { import = "astrocommunity.completion.avante-nvim" }, } diff --git a/home/base/tui/editors/neovim/nvim/lua/plugins/avante.lua b/home/base/tui/editors/neovim/nvim/lua/plugins/avante.lua new file mode 100644 index 00000000..5a9d8711 --- /dev/null +++ b/home/base/tui/editors/neovim/nvim/lua/plugins/avante.lua @@ -0,0 +1,101 @@ +local prefix = "A" +return { + "yetone/avante.nvim", + event = "User AstroFile", -- load on file open because Avante manages it's own bindings + cmd = { + "AvanteAsk", + "AvanteBuild", + "AvanteEdit", + "AvanteRefresh", + "AvanteSwitchProvider", + "AvanteShowRepoMap", + "AvanteModels", + "AvanteChat", + "AvanteToggle", + "AvanteClear", + "AvanteFocus", + "AvanteStop", + }, + version = false, -- Never set this value to "*"! Never! + opts = { + -- add any opts here + provider = "deepseek", + vendors = { + deepseek = { + __inherited_from = "openai", + api_key_name = "DEEPSEEK_API_KEY", + endpoint = "https://api.deepseek.com", + model = "deepseek-chat", + }, + }, + }, + -- 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 = { + "nvim-treesitter/nvim-treesitter", + { "stevearc/dressing.nvim", optional = true }, + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + { "AstroNvim/astrocore", opts = function(_, opts) opts.mappings.n[prefix] = { desc = " Avante" } end }, + --- The below dependencies are optional, + -- "echasnovski/mini.pick", -- for file_selector provider mini.pick + "nvim-telescope/telescope.nvim", -- for file_selector provider telescope + "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions + "ibhagwan/fzf-lua", -- for file_selector provider fzf + "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, + }, + mappings = { + ask = prefix .. "", + edit = prefix .. "e", + refresh = prefix .. "r", + focus = prefix .. "f", + select_model = prefix .. "?", + stop = prefix .. "S", + select_history = prefix .. "h", + toggle = { + default = prefix .. "t", + debug = prefix .. "d", + hint = prefix .. "h", + suggestion = prefix .. "s", + repomap = prefix .. "R", + }, + diff = { + next = "]c", + prev = "[c", + }, + files = { + add_current = prefix .. ".", + add_all_buffers = prefix .. "B", + }, + }, + }, + specs = { -- configure optional plugins + { "AstroNvim/astroui", opts = { icons = { Avante = "" } } }, + }, + }, + { + -- Make sure to set this up properly if you have lazy=true + "MeanderingProgrammer/render-markdown.nvim", + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, +}