fix on macos

This commit is contained in:
RingOfStorms (Joshua Bell) 2024-11-14 15:10:50 -06:00
parent 615c53c8fb
commit ff0770f3ed
2 changed files with 22 additions and 9 deletions

View file

@ -309,11 +309,15 @@
"LD_LIBRARY_PATH"
":"
"${avante-nvim-lib}/lib"
# Add Lua C modules path
# Add Lua C modules path TODO make these conditional so on linux, and dylib for mac it shouldn't be both...
"--prefix"
"LUA_CPATH"
";"
"${avante-nvim-lib}/lib/?.so"
"--prefix"
"LUA_CPATH"
";"
"${avante-nvim-lib}/lib/?.dylib"
# Don't use default directories to not collide with another neovim config
# All things at runtime should be deletable since we are using nix to handle downloads and bins
# so I've chosen to put everything into the local state directory.

View file

@ -33,14 +33,23 @@ return {
end
end,
lazy = false,
opts = {
provider = "claude",
opts = function()
local provider
if os.getenv("ANTHROPIC_API_KEY") then
provider = "claude"
else
provider = "copilot"
end
return {
provider = provider,
behavior = {
-- auto_suggestions = true, -- Experimental stage
auto_set_keymaps = false,
support_paste_from_clipboard = true,
},
},
}
end,
config = function(_, opts)
require("avante_lib").load()
require("avante").setup(opts)