google-complete-me
google-complete-me copied to clipboard
Proxy problem
Hey, Looks like proxy settings are not handled by google-complete-me. Due to that I'm getting error:
[jaydenlin.google-complete-me]request to http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=warsz failed, reason: getaddrinfo ENOTFOUND suggestqueries.google.com suggestqueries.google.com:80
Fixed with HttpsProxyAgent
and additional configuration for node-fetch
:
extensions.js:CompleteProvider.prototype.provideCompletionItems
fetch('http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=' + getUserKeyIn(lineText, position), {
agent: process.env.HTTP_PROXY != '' ? new HttpsProxyAgent(process.env.HTTP_PROXY) : null,
timeout: 10000 // It would be nice to set it in VS Code settings
})
I'll fork your repo and create pull req.