chatgpt.nvim is a Neovim plugin that integrates OpenAI's ChatGPT API directly into the editor for natural language generation and code assistance.
The plugin addresses the need to access ChatGPT capabilities without leaving your editor. It works by communicating with OpenAI's API through curl, presenting responses in an interactive interface within Neovim. The tool supports multiple interaction modes: direct question-and-answer sessions, persona-based conversations using predefined prompts, and code-focused assistance including completion suggestions and editing. It offers built-in actions for common tasks like grammar correction, translation, test generation, and bug fixing, while allowing users to define custom actions through JSON configuration. The plugin renders rich formatted output including styled code blocks with language headers and copy indicators, markdown formatting, and diff highlighting. An inline context system using the @ symbol lets users reference LSP definitions or project files directly in prompts.
The plugin suits developers who work primarily in Neovim and want ChatGPT integration without context switching. It works well for code review, documentation generation, and iterative coding tasks. The tool requires an OpenAI API key with purchased credits, separate from a ChatGPT Plus subscription. It supports custom API hosts and Azure deployments, making it adaptable to different infrastructure setups.
The project has attracted a substantial user base, as evidenced by most open issues coming from outside users rather than the core team. However, responses to issues and pull requests often take weeks or longer. Work in the issue tracker centers on bug fixes and enhancement requests.