gp.nvim  by Robitx

Neovim plugin for AI-assisted text/code operations

created 2 years ago
1,237 stars

Top 32.5% on sourcepulse

GitHubView on GitHub
Project Summary

This Neovim plugin integrates AI capabilities, including ChatGPT-like sessions, instructable text/code operations, and speech-to-text, directly into the editor. It targets developers and power users seeking to leverage LLMs for enhanced productivity within their existing workflow, offering features like streaming responses, robust undo, and extensive customization via hooks.

How It Works

Gp.nvim operates by interacting with various LLM providers (OpenAI, Ollama, Anthropic, Perplexity, Google Gemini, Copilot) through a unified interface. It leverages Neovim's buffer management for chat sessions and uses templating to construct prompts from user selections, context, and custom instructions. Responses are streamed directly into Neovim buffers or popups, with a focus on native integration and extensibility through Lua hooks.

Quick Start & Requirements

  • Install: Via lazy.nvim, packer.nvim, or vim-plug.
  • Prerequisites: Neovim, curl, grep. Optional: sox for speech-to-text.
  • API Keys: Requires API keys for chosen LLM providers (e.g., OpenAI). Keys can be managed via environment variables, files, or password managers for enhanced security.
  • Configuration: Minimal setup involves providing API keys and optionally configuring providers and agents.
  • Docs: https://github.com/Robitx/gp.nvim

Highlighted Details

  • Supports multiple LLM providers including local Ollama and GitHub Copilot.
  • Features instructable text/code operations with various output targets (rewrite, append, new buffer, etc.).
  • Integrates speech-to-text using Whisper for dictation and command input.
  • Allows custom repository-specific instructions via .gp.md files.
  • Extensible via Lua hooks for custom commands and workflows.

Maintenance & Community

The project is actively maintained by Robitx. Community interaction and support channels are not explicitly detailed in the README.

Licensing & Compatibility

The plugin is distributed under the MIT license, allowing for commercial use and integration with closed-source projects.

Limitations & Caveats

While the core functionality relies on minimal dependencies, advanced features like speech-to-text require external tools (sox). The effectiveness of custom instructions can vary between different LLM models.

Health Check
Last commit

3 months ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.