CopilotC-Nvim / CopilotChat.nvim

Chat with GitHub Copilot in Neovim
https://copilotc-nvim.github.io/CopilotChat.nvim/
GNU General Public License v3.0
1.68k stars 78 forks source link

Neovim Reinstallation Causes CopilotChat.nvim to error on Missing 'hosts.json' File #267

Closed ghost closed 6 months ago

ghost commented 6 months ago

Issue Description: Whenever I reinstall Neovim and lazy.nvim tries to load the CopilotChat.nvim plugin while not logged into my Copilot account through the copilot.lua plugin, it crashes with an error. The error states that it failed to run 'config' due to a missing 'github-copilot/hosts.json' file. This error occurs consistently upon starting neovim and when not authenticated with GitHub Copilot.

Steps to Reproduce: Open Neovim. Ensure that I am not logged into my GitHub Copilot account through copilot.lua plugin. Let Lazy.nvim load CopilotChat.nvim.

Error Message: Failed to run 'config' for CopilotChat.nvim Vim:E484: Can't open file /home/username/.config/github-copilot/hosts.json

stacktrace:

Neovim version 9.5 crash