llm.nvim  by huggingface

Neovim plugin for LLM-powered code completion

created 2 years ago
1,062 stars

Top 36.2% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
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

6 months ago

Responsiveness

1 week

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

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP of AI at Vercel; Founder of Turborepo; Author of Formik, TSDX), Lysandre Debut Lysandre Debut(Chief Open-Source Officer at Hugging Face), and
4 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.