Skip to content

bug: Can not use copilot.vim for Copilot provider, recent versions dont create needed apps.json file #3121

Description

@GiggioG

Describe the bug

The recent versions of copilot.vim don't create the ~/.config/github-copilot/apps.json file, which is needed for avante to use Github Copilot as a provider. Avante, on the other hand, still expects it to be there.
In its place copilot.vim creates auth.db, which avante can't use for login.

To reproduce

Neovim v.0.12.2, Linux Mint 22.3
First login with copilot.vim: :Copilot setup
Then add Avante to the init.lua and refresh, install it and after :AvanteBuild,
type :AvanteSwitchProvider and pick copilot

Expected behavior

I expect after logging in with :Copilot auth to be able to do :AvanteSwitchProvider, pick Copilot and it recognise it, as it does for other providers.

Installation method

I installed it using vim.pack on neovim v0.12.2.

vim.pack.add({
	{ src = "https://github.com/neovim/nvim-lspconfig" },
	{ src = "https://github.com/mason-org/mason.nvim" },
	{ src = "https://github.com/nvim-treesitter/nvim-treesitter" },
	{ src = "https://github.com/vyfor/cord.nvim" },
	{ src = "https://github.com/ivanesmantovich/xkbswitch.nvim" },
	{ src = "https://github.com/nvim-lua/plenary.nvim" },
	{ src = "https://github.com/MunifTanjim/nui.nvim" },
	{ src = "https://github.com/github/copilot.vim" },
	{ src = "https://github.com/yetone/avante.nvim" }
})

Environment

uname -a:

Linux hostname 6.17.0-35-generic #35~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 19:30:42 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

nvim -V1 -v:

NVIM v0.12.2
Build type: Release
LuaJIT 2.1.1774638290
Vim versions: 8.1, 8.2, 9.0, 9.1, 9.2

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info

Repro

vim.pack.add({
	{ src = "https://github.com/nvim-lua/plenary.nvim" },
	{ src = "https://github.com/MunifTanjim/nui.nvim" },
	{ src = "https://github.com/github/copilot.vim" },
	{ src = "https://github.com/yetone/avante.nvim" }
})

require "avante".setup()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions