neoai.nvim  by Bryley

Neovim plugin for interacting with OpenAI GPT models

created 2 years ago
575 stars

Top 56.9% on sourcepulse

GitHubView on GitHub
Project Summary

NeoAI.nvim is a Neovim plugin that integrates OpenAI's GPT models for code generation, text rewriting, and contextual suggestions. It targets Neovim users seeking to enhance their coding workflow with AI assistance, offering a seamless experience without disrupting their focus.

How It Works

The plugin provides three primary interaction modes: Normal GUI Mode for chat-like interactions within Neovim, Context Mode for providing specific code or text snippets as context for AI queries, and Inject Mode for direct, non-GUI insertion of AI responses into the buffer. This multi-modal approach allows users to choose the most efficient method for their task, from quick code fixes to detailed explanations.

Quick Start & Requirements

  • Installation: Via plugin managers like vim-plug, lazy.nvim, or packer.nvim. Requires MunifTanjim/nui.nvim and curl.
  • Prerequisites: OpenAI API key set as the OPENAI_API_KEY environment variable.
  • Setup: Configuration involves adding the plugin and its dependency to your Neovim configuration.
  • Docs: https://github.com/Bryley/neoai.nvim

Highlighted Details

  • Supports multiple interaction modes: GUI chat, context-aware queries, and direct injection.
  • Includes customizable shortcuts for common tasks like text summarization and Git commit message generation.
  • Outputs can be automatically saved to registers (g for general, c for code snippets).
  • Offers flexibility in API key retrieval, including environment variables, direct values, or custom functions.

Maintenance & Community

Licensing & Compatibility

  • Licensed under the MIT License.
  • Permits commercial use and linking with closed-source projects.

Limitations & Caveats

The plugin is in early development and subject to change. Users are cautioned about potential OpenAI costs and advised to monitor usage. Some features like tests and multiple chat sessions are still under development.

Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
1
Star History
5 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.