I used to use Github Copilot, but I find Cursor (https://cursor.sh/) to be even better.
You can add an OpenAI API Key and it'll use the GPT-4 API. It indexes your code for you and it'll crawl documentation for you if you give it the link. Then you can reference specific files or documentation with "@". There are also some really intuitive hot keys.