Neovim OpenAI Codex, GitHub Copilot, and cheat.sh
Use OpenAI Codex in Neovim, and compare the suggestions with GitHub Copilot and cheat.sh.
In a previous article, we walked through AI-assisted completion using Tabnine, GitHub Copilot, and OpenAI Codex.
In this article, let’s develop a Neovim plugin to try out OpenAI Codex, and compare the suggestions with GitHub Copilot and cheat.sh.
OpenAI Codex
OpenAI Codex is an artificial intelligence model developed by OpenAI that can parse natural language and generate code in response.
A Lua Module for Codex
Instead of using a plugin like nvim-magic, let’s write a simple Lua module for Neovim.
Here is a full listing of the Lua module.
- To use OpenAI Codex, you need to have the API key. API_KEY_FILE specifies the location of the file containing the API key.
- There are 2 models available. The Davinci Codex is the most capable…