yetone / avante.nvim

Use your Neovim like using Cursor AI IDE!
Apache License 2.0
6.44k stars 234 forks source link

bug: Error IMMEDIATELY after installing it in my own config #722

Closed TympanicLemon closed 1 week ago

TympanicLemon commented 1 week ago

Describe the bug

Installed the plugin and IMMEDIEATELY get this bug on entering a buffer at anytime The plugin works when I ONLY install the plugin and have no other plugins or options or anything else installed, but I have no idea why this works this way.

So something in my config is messing with it but I have no idea what it would even be

My config: https://github.com/TympanicLemon/nvim-new

To reproduce

 Error 09:19:33 msg_show.lua_error Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/avante.nvim/lua/avante/repo_map.lua:19: Failed to load avante_repo_map stack traceback: [C]: in function 'error' ...ocal/share/nvim/lazy/avante.nvim/lua/avante/repo_map.lua:19: in function '' vim/_editor.lua: in function '' vim/_editor.lua: in function <vim/_editor.lua:0>

Expected behavior

It was able to detect my openai key, but i get that error every time i enter a buffer and can't use the plugin at all

Installation method

Use lazy.nvim:

return {
    "yetone/avante.nvim",
    event = "VeryLazy",
    lazy = false,
    version = true,
    opts = {
        provider = "openai",
    },
    build = "make",
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
        "stevearc/dressing.nvim",
        "nvim-lua/plenary.nvim",
        "MunifTanjim/nui.nvim",
        "nvim-tree/nvim-web-devicons",
        {
            "MeanderingProgrammer/render-markdown.nvim",
            opts = {
                file_types = { "markdown", "Avante" },
            },
            ft = { "markdown", "Avante" },
        },
    },
}

Environment

neovim version: 0.10.2 Macos 15.0.1 Darwin Daniels-MBP-2.attlocal.net 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 arm64

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    -- add any other plugins here
  },
})
yetone commented 1 week ago

Can you follow these steps?

https://github.com/yetone/avante.nvim/issues/612#issuecomment-2375729928

TympanicLemon commented 1 week ago

@yetone So, i installed it so I could go ahead and fix the issues and BOOM, it started to work fine with no issues, lol. Regardless thank you so much for the help, I really appreciate it :)