-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: avante and code-companion setup for lazyvim
- Loading branch information
1 parent
f9ae38b
commit 3baa24b
Showing
6 changed files
with
241 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,106 @@ | ||
{ | ||
"LazyVim": { "branch": "main", "commit": "7c7c196a78e936a1bc4cf28e7908e9bd96d75607" }, | ||
"LuaSnip": { "branch": "master", "commit": "8d7aa7a7b7c0875e4878d1d2590924bc1c229305" }, | ||
"LazyVim": { "branch": "main", "commit": "adcbfc72fd8d0808d78bdfe0940d98c6432c4ef0" }, | ||
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, | ||
"NeoTerm.lua": { "branch": "main", "commit": "f71a4a9663c52673a677a09894d945983c8da303" }, | ||
"SchemaStore.nvim": { "branch": "main", "commit": "a5f6e784d2000f9570791d5f43040ab29e13f9e3" }, | ||
"SchemaStore.nvim": { "branch": "main", "commit": "bbd005a56daab7a19ceea22360a836957ac2c42c" }, | ||
"age.nvim": { "branch": "main", "commit": "49f5f7c56901fe219ff4371ecf67124345d20185" }, | ||
"avante.nvim": { "branch": "main", "commit": "16c4254b14ebe8acb79f6abecb49ca36b9d96cb0" }, | ||
"blink.cmp": { "branch": "main", "commit": "917026450f5fa051cda9c538b517f0cf28ceec6f" }, | ||
"bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" }, | ||
"bullets.vim": { "branch": "master", "commit": "2253f970e54320dbd76fd6bb4f5a0bf2436ce232" }, | ||
"catppuccin": { "branch": "main", "commit": "65bf0b16f57a3db70d6a93ac68882dd9a31d0565" }, | ||
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, | ||
"clangd_extensions.nvim": { "branch": "main", "commit": "8f7b72100883e0e34400d9518d40a03f21e4d0a6" }, | ||
"cmp-async-path": { "branch": "main", "commit": "d6d1ffa2075039632a2d71e8fa139818e15ac757" }, | ||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, | ||
"cmp-git": { "branch": "main", "commit": "ec049036e354ed8ed0215f2427112882e1ea7051" }, | ||
"cmp-look": { "branch": "master", "commit": "971e65a6be0e75c3438fe7b176d4fc020cb89d7b" }, | ||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, | ||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, | ||
"cmp-rg": { "branch": "master", "commit": "d6cea15ad504369ec98f3de73b9631dfdd23a671" }, | ||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, | ||
"conform.nvim": { "branch": "master", "commit": "4dd429fe3f47077f4e50cdaf03f7877ce9b213e0" }, | ||
"cmp-rg": { "branch": "master", "commit": "70a43543f61b6083ba9c3b7deb9ccee671410ac6" }, | ||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, | ||
"codecompanion.nvim": { "branch": "main", "commit": "4394bc14642f3fecd5b074ac9304c3e457888b58" }, | ||
"conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, | ||
"copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" }, | ||
"crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" }, | ||
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, | ||
"dial.nvim": { "branch": "master", "commit": "ed4d6a5bbd5e479b4c4a3019d148561a2e6c1490" }, | ||
"dial.nvim": { "branch": "master", "commit": "46b4375e84e8eb771129bff6b2b1e47746601ef9" }, | ||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, | ||
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, | ||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, | ||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, | ||
"fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" }, | ||
"gitsigns.nvim": { "branch": "main", "commit": "7c27a30450130cd59c4994a6755e3c5d74d83e76" }, | ||
"fzf-lua": { "branch": "main", "commit": "ce978474e406f4faacd2e66ec35d93b9e8ae069e" }, | ||
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, | ||
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, | ||
"gruber-darker.nvim": { "branch": "main", "commit": "a2dda61d9c1225e16951a51d6b89795b0ac35cd6" }, | ||
"grug-far.nvim": { "branch": "main", "commit": "190c03d54e8976491e6e49acb97087bf4182b079" }, | ||
"grug-far.nvim": { "branch": "main", "commit": "9a2f78219390b47d67795ab09390d7f092e23976" }, | ||
"gx.nvim": { "branch": "main", "commit": "cc70d112b14d18dd7b123a5d5288266a60e8189e" }, | ||
"indent-blankline.nvim": { "branch": "master", "commit": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c" }, | ||
"img-clip.nvim": { "branch": "main", "commit": "28a32d811d69042f4fa5c3d5fa35571df2bc1623" }, | ||
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, | ||
"kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" }, | ||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, | ||
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, | ||
"lualine.nvim": { "branch": "master", "commit": "640260d7c2d98779cab89b1e7088ab14ea354a02" }, | ||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, | ||
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, | ||
"lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, | ||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, | ||
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, | ||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, | ||
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, | ||
"mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, | ||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, | ||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, | ||
"mini.ai": { "branch": "main", "commit": "9b9b7cfa38b4871c3e44cfe89cf6d53fd40684d9" }, | ||
"mini.ai": { "branch": "main", "commit": "31c149067d38b97720d2a179619f7745a0006ecc" }, | ||
"mini.align": { "branch": "main", "commit": "26111a737494bc39576ad67b52bbc2638ca23553" }, | ||
"mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" }, | ||
"mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" }, | ||
"mini.misc": { "branch": "main", "commit": "428da688126b320194a944233f9f8dfc46669307" }, | ||
"mini.move": { "branch": "main", "commit": "4caa1c212f5ca3d1633d21cfb184808090ed74b1" }, | ||
"mini.pairs": { "branch": "main", "commit": "927d19cbdd0e752ab1c7eed87072e71d2cd6ff51" }, | ||
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, | ||
"neogen": { "branch": "main", "commit": "e932ba918b56723436b77aa3efb844a11b2851ab" }, | ||
"neogit": { "branch": "master", "commit": "001f43f50d9589d837cec59004fd92486ab06870" }, | ||
"neo-tree.nvim": { "branch": "main", "commit": "42caaf5c3b7ca346ab278201151bb878006a6031" }, | ||
"neogen": { "branch": "main", "commit": "e3b8f6dca1c67c73ae2817418d39c061fdb65064" }, | ||
"neogit": { "branch": "master", "commit": "26c5550016b20e4f47b376192f12a54be8897aaa" }, | ||
"neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, | ||
"neotest-elixir": { "branch": "master", "commit": "c5067bcc3ec6a0bba7b5694fa15aeb17f16aeb3c" }, | ||
"neotest-golang": { "branch": "main", "commit": "c3f8b231f49a5bdfa3d0725e1b1b45104b578a2c" }, | ||
"neotest-golang": { "branch": "main", "commit": "cdb0eb0edfedcdf145972fdbe19fb95d17d987c2" }, | ||
"neotest-jest": { "branch": "main", "commit": "514fd4eae7da15fd409133086bb8e029b65ac43f" }, | ||
"neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, | ||
"neotest-vitest": { "branch": "main", "commit": "9e30dca989a2287cf3fde86b3e138ea7fa4de935" }, | ||
"neovim-session-manager": { "branch": "master", "commit": "35c154a4b904cbe2aa7acce00a8c1c54a8831780" }, | ||
"noice.nvim": { "branch": "main", "commit": "3cd84d402e0b5a56cf06b6c7f644a3cc9a3956a6" }, | ||
"noice.nvim": { "branch": "main", "commit": "5af819a250f6b73727e10bab09df61673e5db7f2" }, | ||
"nordic.nvim": { "branch": "main", "commit": "1ee4044077059b34eacd18d93613495a602c131f" }, | ||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, | ||
"nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, | ||
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, | ||
"nvim-cmp": { "branch": "main", "commit": "ed31156aa2cc14e3bc066c59357cc91536a2bc01" }, | ||
"nvim-dap": { "branch": "master", "commit": "cc92b054720a96170eca6bd9bdedd43d2b0a7a8a" }, | ||
"nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, | ||
"nvim-dap-python": { "branch": "master", "commit": "3e3dd98d4d83715c9e0e429b4a5da7bd706e6ceb" }, | ||
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, | ||
"nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" }, | ||
"nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" }, | ||
"nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" }, | ||
"nvim-highlight-colors": { "branch": "main", "commit": "e967e2ba13fd4ca731b41d0e5cc1ac2edcd6e25e" }, | ||
"nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, | ||
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, | ||
"nvim-lspconfig": { "branch": "master", "commit": "54617a18f4cf46f0c2f6d024fa6feb7515fe036d" }, | ||
"nvim-lspconfig": { "branch": "master", "commit": "fe88eade4ab50fca9ace99205cad1d91645ed9e8" }, | ||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, | ||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, | ||
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, | ||
"nvim-surround": { "branch": "main", "commit": "dca2e998ff26681ee422b92c6ed39b3d2908d8a9" }, | ||
"nvim-treesitter": { "branch": "master", "commit": "1c111e3e8f42c85b16cb4bf30e4254fcb5607817" }, | ||
"nvim-treesitter-context": { "branch": "master", "commit": "a2a334900d3643de585ac5c6140b03403454124f" }, | ||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, | ||
"nvim-treesitter": { "branch": "master", "commit": "28591731d84c2fc18ddda60e1d53da24c31c4987" }, | ||
"nvim-treesitter-context": { "branch": "master", "commit": "6b081ea63a3711243d11540ce28ccdb6f35ecd33" }, | ||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, | ||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, | ||
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, | ||
"nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, | ||
"nvim-window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" }, | ||
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, | ||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, | ||
"quick-scope": { "branch": "master", "commit": "4d35d3b2bc6794666353dcc241b2680bd560416f" }, | ||
"refactoring.nvim": { "branch": "master", "commit": "53ed6854e0bba64d467c58e87084dcf8b1c22d36" }, | ||
"render-markdown.nvim": { "branch": "main", "commit": "fc05fb7c56795f191b6800799a2ec6ea325ba715" }, | ||
"refactoring.nvim": { "branch": "master", "commit": "2db6d378e873de31d18ade549c2edba64ff1c2e3" }, | ||
"render-markdown.nvim": { "branch": "main", "commit": "6096cf3608b576a38fd1396227dbc0473091714d" }, | ||
"resession.nvim": { "branch": "master", "commit": "c4d92a57b3936a2d6e1c087dbd6b670da2b1b082" }, | ||
"rustaceanvim": { "branch": "master", "commit": "7405d2d84ce96e460d548cf7e8def332ac6e19f0" }, | ||
"rustaceanvim": { "branch": "master", "commit": "fee0aa094b0c9f93fffe5a385b3d5d2386c2b072" }, | ||
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, | ||
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" }, | ||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, | ||
"tokyonight.nvim": { "branch": "main", "commit": "6c30395146c246055ac3cea32d39d6b9876a1dcc" }, | ||
"trouble.nvim": { "branch": "main", "commit": "2f3b537f2207ce32f4459f9d56746ee013b5e01b" }, | ||
"trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" }, | ||
"ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" }, | ||
"ts-error-translator.nvim": { "branch": "main", "commit": "3bd23c4cfe4c2edc99278e01b75cdb2a26f03152" }, | ||
"ts-error-translator.nvim": { "branch": "main", "commit": "47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4" }, | ||
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "9e3209190c22953566ae4e6436ad2b4ff4dabb95" }, | ||
"venv-selector.nvim": { "branch": "regexp", "commit": "e82594274bf7b54387f9a2abe65f74909ac66e97" }, | ||
"vim-subversive": { "branch": "master", "commit": "cea98a62ded4028118ad71c3e81b26eff2e0b8a0" }, | ||
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, | ||
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }, | ||
"yazi.nvim": { "branch": "main", "commit": "6616bd5a24280d5a21d9110025451a69ebc9708e" } | ||
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }, | ||
"yazi.nvim": { "branch": "main", "commit": "053867916a9be3cb46f84b6f095ee731bbddd213" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
local M = {} | ||
|
||
--- A wrapper around `age.nvim` to get the credentials from the identity file. | ||
---@param secret_file string The secret file to read the credentials from(`secret_file` should be in location `$HOME/.config/age/`). | ||
---@return string|nil secret The credentials from the identity file. | ||
function M.get_age_credentials(secret_file) | ||
if not vim.fn.filereadable("$HOME/.config/age/identity.txt") then | ||
return nil | ||
end | ||
local identity = vim.fn.expand("$HOME/.config/age/identity.txt") | ||
local secret = vim.fn.expand("$HOME/.config/age/" .. secret_file) | ||
return require("age").get(identity, secret) | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
---@type LazySpec | ||
return { | ||
"olimorris/codecompanion.nvim", | ||
cmd = { | ||
"CodeCompanion", | ||
"CodeCompanionChat", | ||
"CodeCompanionCmd", | ||
"CodeCompanionActions", | ||
}, | ||
keys = { | ||
{ "<leader>cc", "<cmd>CodeCompanionChat toggle<CR>", desc = "Chat Toggle", mode = { "n", "x" } }, | ||
{ "<leader>cA", "<cmd>CodeCompanionChat add<CR>", desc = "Chat Add Selection", mode = "x" }, | ||
{ "<leader>ca", "<cmd>CodeCompanionActions<CR>", desc = "Chat Actions", mode = { "n", "x" } }, | ||
{ "<leader>cd", "<cmd>CodeCompanionCmd<space>/", desc = "Chat Cmd" }, | ||
}, | ||
dependencies = { | ||
"nvim-lua/plenary.nvim", | ||
"nvim-treesitter/nvim-treesitter", | ||
"KingMichaelPark/age.nvim", | ||
{ | ||
"MeanderingProgrammer/render-markdown.nvim", | ||
opts = { | ||
file_types = { "markdown", "Avante", "codecompanion" }, | ||
}, | ||
ft = { "markdown", "Avante", "codecompanion" }, | ||
}, | ||
}, | ||
config = function() | ||
require("codecompanion").setup({ | ||
display = { chat = { render_headers = false } }, | ||
strategies = { | ||
--NOTE: Change the adapter as required | ||
chat = { adapter = "openai_compatible" }, | ||
inline = { adapter = "openai_compatible" }, | ||
}, | ||
adapters = { | ||
openai_compatible = function() | ||
return require("codecompanion.adapters").extend("openai_compatible", { | ||
env = { | ||
url = "https://glhf.chat", | ||
api_key = function() | ||
require("m-utils").get_age_credentials("glhf.age") | ||
end, | ||
chat_url = "/api/openai/v1/chat/completions", | ||
}, | ||
schema = { | ||
model = { default = "hf:Qwen/Qwen2.5-Coder-32B-Instruct" }, | ||
num_ctx = { default = 32768 }, | ||
}, | ||
}) | ||
end, | ||
}, | ||
}) | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
---@type LazySpec | ||
return { | ||
"yetone/avante.nvim", | ||
event = "VeryLazy", | ||
version = false, | ||
build = "make", | ||
opts = function() | ||
vim.env.GEMINI_API_KEY = require("m-utils").get_age_credentials("gemini_api.age") | ||
local ollama_setup = { | ||
-- add any opts here | ||
---@type Provider | ||
provider = "gemini", | ||
vendors = { | ||
---@type AvanteProvider | ||
ollama = { | ||
["local"] = true, | ||
endpoint = "127.0.0.1:11434/v1", | ||
model = "llama3.2", | ||
parse_curl_args = function(opts, code_opts) | ||
return { | ||
url = opts.endpoint .. "/chat/completions", | ||
headers = { | ||
["Accept"] = "application/json", | ||
["Content-Type"] = "application/json", | ||
}, | ||
body = { | ||
model = opts.model, | ||
messages = require("avante.providers").copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced | ||
max_tokens = 2048, | ||
stream = true, | ||
}, | ||
} | ||
end, | ||
parse_response_data = function(data_stream, event_state, opts) | ||
require("avante.providers").openai.parse_response(data_stream, event_state, opts) | ||
end, | ||
}, | ||
}, | ||
} | ||
if not vim.env.GEMINI_API_KEY then | ||
return ollama_setup | ||
end | ||
return { | ||
---@type Provider | ||
provider = "gemini", | ||
} | ||
end, | ||
dependencies = { | ||
"KingMichaelPark/age.nvim", -- Add age dependency | ||
"nvim-treesitter/nvim-treesitter", | ||
{ | ||
"stevearc/dressing.nvim", | ||
opts = { | ||
select = { | ||
-- Priority list of preferred vim.select implementations | ||
backend = { "fzf_lua", "telescope", "fzf", "builtin", "nui" }, | ||
-- Options for fzf-lua | ||
fzf_lua = { | ||
winopts = { | ||
height = 0.5, | ||
width = 0.8, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
"nvim-lua/plenary.nvim", | ||
"MunifTanjim/nui.nvim", | ||
--- The below dependencies are optional, | ||
"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" }, | ||
}, | ||
}, | ||
} |
Oops, something went wrong.