We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7186704 commit 7d8ab93Copy full SHA for 7d8ab93
lua/copilot/setup.lua
@@ -35,7 +35,8 @@ local function oauth_save(oauth_token)
35
end
36
37
M.get_cred = function ()
38
- local userdata = vim.fn.json_decode(vim.api.nvim_eval("readfile('/home/zach/.config/github-copilot/hosts.json')"))
+ local config = vim.fn.expand('$XDG_CONFIG_HOME')
39
+ local userdata = vim.fn.json_decode(vim.api.nvim_eval("readfile('" .. config .. "/github-copilot/hosts.json')"))
40
local token = userdata["github.com"].oauth_token
41
local user = oauth_user(token)
42
return {user = user, token = token}
0 commit comments