Good day! When I was trying to run this plugin in GitHub Codespace, I realised github/copilot.vim plug-in works but CopilotChat.nvim is unable to find hosts.json.
After some digging, I realised this might be due to copilot.vim loading token from environment GITHUB_TOKEN and not creating /github-copilot/hosts.json as expected.
Recommended fix would be to modify get_cached_token() function in copilot.lua
local function get_cached_token()
-- get oauth token from environment variable
local token = os.getenv('GITHUB_TOKEN')
if token then
return token
end
-- continue with existing function
Good day! When I was trying to run this plugin in GitHub Codespace, I realised
github/copilot.vim
plug-in works butCopilotChat.nvim
is unable to findhosts.json
.After some digging, I realised this might be due to
copilot.vim
loading token from environmentGITHUB_TOKEN
and not creating/github-copilot/hosts.json
as expected.Recommended fix would be to modify
get_cached_token()
function incopilot.lua