Skip to content

Commit 7d8ab93

Browse files
committed
fix config absolute
1 parent 7186704 commit 7d8ab93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/copilot/setup.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ local function oauth_save(oauth_token)
3535
end
3636

3737
M.get_cred = function ()
38-
local userdata = vim.fn.json_decode(vim.api.nvim_eval("readfile('/home/zach/.config/github-copilot/hosts.json')"))
38+
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')"))
3940
local token = userdata["github.com"].oauth_token
4041
local user = oauth_user(token)
4142
return {user = user, token = token}

0 commit comments

Comments
 (0)