llm.nvim  by huggingface

Neovim plugin for LLM-powered code completion

Created 2 years ago
1,080 stars

Top 35.1% on SourcePulse

GitHubView on GitHub
Project Summary

This Neovim plugin provides LLM-powered code completion and generation, inspired by GitHub Copilot. It targets developers seeking AI assistance within their editor, offering "ghost-text" suggestions and configurable backend integrations for various LLM hosting solutions.

How It Works

The plugin leverages llm-ls as its backend Language Server. It supports multiple backends including Hugging Face Inference API, Ollama, OpenAI, and Text Generation Inference (TGI). Requests are made via HTTP, with configurations for model selection, API tokens, and custom request bodies. The plugin intelligently manages context window limits using tokenizers, ensuring prompts fit the model's constraints.

Quick Start & Requirements

  • Install via packer.nvim, lazy.nvim, or vim-plug.
  • Requires Neovim.
  • llm-ls is automatically downloaded or can be installed via mason.nvim.
  • Hugging Face API token is recommended for Inference API usage.

Highlighted Details

  • Supports "ghost-text" code completion.
  • Integrates with Hugging Face Inference API, Ollama, OpenAI, and TGI.
  • Configurable tokenizer for context window management.
  • Fill-in-the-middle (FIM) support for models like StarCoder and CodeLlama.
  • Customizable suggestion behavior and keymaps.

Maintenance & Community

  • Developed by Hugging Face.
  • llm-ls binary management is included.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial use and closed-source projects.

Limitations & Caveats

The Hugging Face Inference API free tier has rate limits; a PRO subscription is recommended. The plugin's behavior and model compatibility depend heavily on the chosen backend and model configuration.

Health Check
Last Commit

8 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP AI at Vercel; Founder of Turborepo; Author of Formik, TSDX), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
8 more.

llm-vscode by huggingface

0.1%
1k
VSCode extension for LLM-powered code development
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.