File tree Expand file tree Collapse file tree 2 files changed +2
-26
lines changed
Expand file tree Collapse file tree 2 files changed +2
-26
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,6 @@ M.start = function(params)
1111 cmd_env = {
1212 [" GITHUB_USER" ] = user_data .user ,
1313 [" GITHUB_TOKEN" ] = user_data .token ,
14- [" COPILOT_AGENT_VERBOSE" ] = 1 ,
15- },
16- handlers = {
17- [" getCompletions" ] = function ()
18- print (" get completions" )
19- end ,
20- [" textDocumentSync" ] = function ()
21- print (" handle" )
22- end ,
2314 },
2415 name = " copilot" ,
2516 trace = " messages" ,
@@ -46,18 +37,4 @@ M.start = function(params)
4637 })
4738end
4839
49- -- this doesn't seem to do anything so remove for now
50- -- local send_editor_info = function()
51- -- vim.lsp.buf_request_sync(0, "setEditorInfo", {
52- -- editorPluginInfo = {
53- -- name = "copilot.vim",
54- -- version = "1.1.0",
55- -- },
56- -- editorInfo = {
57- -- version = "0.7.0-dev+1343-g4d3acd6be-dirty",
58- -- name = "Neovim",
59- -- },
60- -- }, 600)
61- -- end
62-
6340return M
Original file line number Diff line number Diff line change @@ -26,9 +26,7 @@ local function json_body(response)
2626end
2727
2828local function oauth_user (token )
29- return vim .json .decode (
30- vim .fn .system (' curl -s --header "Authorization: Bearer ' .. token .. ' " https://api.github.com/user' )
31- )
29+ return vim .fn .system (' curl -s --header "Authorization: Bearer ' .. token .. ' " https://api.github.com/user' )
3230end
3331
3432local function oauth_save (oauth_token )
@@ -37,6 +35,7 @@ local function oauth_save(oauth_token)
3735 return github
3836end
3937
38+
4039M .get_cred = function ()
4140 local userdata = vim .json .decode (
4241 vim .api .nvim_eval (" readfile('" .. find_config_path () .. " /github-copilot/hosts.json')" )[1 ]
You can’t perform that action at this time.
0 commit comments