parrot.nvim  by frankroeder

Neovim plugin for LLM-powered text editing

created 1 year ago
687 stars

Top 50.4% on sourcepulse

GitHubView on GitHub
Project Summary

parrot.nvim integrates Large Language Models (LLMs) into Neovim for text generation, completion, and chat-like editing sessions. It targets Neovim users seeking to leverage AI for code generation, text manipulation, and interactive assistance directly within their editor. The plugin offers a flexible, provider-agnostic architecture, supporting numerous LLM APIs and local models.

How It Works

parrot.nvim acts as a bridge between Neovim and various LLM APIs. It utilizes a modular design, allowing users to configure and switch between different providers (e.g., OpenAI, Anthropic, Ollama) and models. The plugin facilitates text generation through commands like PrtRewrite, PrtAppend, and PrtPrepend, which operate on visual selections. It also supports persistent chat sessions, storing conversations in markdown files and allowing custom hooks for tailored workflows.

Quick Start & Requirements

  • Install: Via package managers like lazy.nvim, packer.nvim, or native Neovim package management.
  • Prerequisites: Neovim 0.10+, plenary.nvim. Optional: ripgrep, fzf, fzf-lua, nvim-notify.
  • Setup: Configure at least one LLM provider with API keys (e.g., via environment variables).
  • Docs: https://github.com/frankroeder/parrot.nvim

Highlighted Details

  • Supports over 10 LLM providers including OpenAI, Anthropic, Gemini, Mistral, Groq, and local Ollama.
  • Offers flexible API key management and custom provider configuration.
  • Features interactive commands with configurable UI (native or buffer) and prompt collections.
  • Includes "thinking" mode for visualizing LLM reasoning steps.
  • Supports context injection via template placeholders ({{filecontent}}, {{selection}}) and completion sources (@file, @buffer).

Maintenance & Community

The project is actively maintained by frankroeder. Community interaction and contributions are encouraged via GitHub issues.

Licensing & Compatibility

MIT License. Compatible with commercial use and closed-source linking.

Limitations & Caveats

The plugin is under active development, with some features based on an early fork. Certain advanced features like "thinking" mode are provider-specific (currently fully implemented for Anthropic). Users may need to manage API keys and potentially troubleshoot provider configurations.

Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
8
Issues (30d)
7
Star History
92 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.