dingllm.nvim  by yacineMTB

Neovim plugin for LLM code editing

created 1 year ago
871 stars

Top 42.1% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides Neovim scripts for interacting with Large Language Models (LLMs), aimed at developers and power users seeking to integrate AI assistance directly into their coding workflow. It offers a lightweight, event-driven approach to LLM integration, designed to avoid potential deadlocks found in other implementations.

How It Works

The plugin leverages Neovim's event system via plenary.nvim for asynchronous LLM interactions, a departure from timed loops. This event-driven architecture is intended to provide a more stable and responsive experience. It supports multiple LLM providers (OpenAI-compatible APIs, Groq, Anthropic, Lambda Labs) and allows for custom API call formatting and response handling, enabling flexible integration with various LLM services.

Quick Start & Requirements

  • Install via lazy.nvim or similar package managers:
{
  'yacineMTB/dingllm.nvim',
  dependencies = { 'nvim-lua/plenary.nvim' },
  config = function()
    -- ... configuration ...
  end,
}
  • Requires plenary.nvim.
  • API keys for desired LLM providers must be set as environment variables (e.g., OPEN_ROUTER_API_KEY, GROQ_API_KEY, LAMBDA_API_KEY, ANTHROPIC_API_KEY).
  • Configuration involves defining LLM endpoints, models, system prompts, and key mappings.

Highlighted Details

  • Event-driven LLM interaction using plenary.nvim to prevent editor deadlocks.
  • Supports multiple LLM providers including Groq, Anthropic, Lambda Labs, and OpenRouter.
  • Allows customization of API call arguments and response handling functions.
  • Provides example configurations for replacing or augmenting code with LLM output.

Maintenance & Community

The project is a fork and rewrite of melbaldove/llm.nvim. The author indicates a willingness to push breaking changes and recommends users read and copy the code directly. No specific community channels or roadmap are linked in the README.

Licensing & Compatibility

The repository does not explicitly state a license. The README mentions it's a fork of melbaldove/llm.nvim, which is licensed under the MIT License. Users should verify licensing for commercial or closed-source use.

Limitations & Caveats

The author explicitly states they will be pushing breaking changes, suggesting a potentially unstable development state. The project is described as "no frills" and "really simple," implying a focus on core functionality rather than extensive features or robust error handling.

Health Check
Last commit

9 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.