llm.nvim  by melbaldove

Neovim plugin for LLM-assisted programming

created 1 year ago
255 stars

Top 99.2% on sourcepulse

GitHubView on GitHub
Project Summary

This Neovim plugin provides LLM-assisted programming features for developers seeking a streamlined, no-frills experience. It integrates with various LLM providers, enabling code generation, explanation, and refactoring directly within the editor.

How It Works

The plugin leverages Neovim's Lua API to send code snippets or selected text to configured LLM services via HTTP requests. It supports OpenAI-compatible endpoints, including Groq, OpenAI, and Anthropic, with the flexibility to add custom providers. Responses are displayed in the Neovim buffer, with an option to replace selected text.

Quick Start & Requirements

  • Install via lazy.nvim:
    {
        "melbaldove/llm.nvim",
        dependencies = { "nvim-neotest/nvim-nio" }
    }
    
  • Set environment variables for API keys (e.g., GROQ_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY).
  • Configuration and usage examples are available in the README.

Highlighted Details

  • Supports multiple LLM providers (Groq, OpenAI, Anthropic) and custom OpenAI-compatible endpoints.
  • Offers text object integration for precise LLM prompting using Vim motions.
  • Includes a create_llm_md function for dedicated prompt/response files.
  • Supports file tagging (@path/to/file.md) for context inclusion.

Maintenance & Community

  • Roadmap includes Ollama support.
  • Inspired by the ask.md VS Code plugin.

Licensing & Compatibility

  • The license is not explicitly stated in the README. Compatibility for commercial use or closed-source linking is undetermined.

Limitations & Caveats

The plugin is primarily configured via Lua and environment variables, requiring familiarity with Neovim's plugin ecosystem. The license status needs clarification for commercial adoption.

Health Check
Last commit

1 year ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.