vim-ollama  by gergap

Vim plugin for local LLM code completion and chat

created 11 months ago
255 stars

Top 98.7% on SourcePulse

GitHubView on GitHub
Project Summary

This plugin provides Copilot-like code completion and chat functionality within Vim, leveraging locally run Ollama-compatible LLMs for enhanced privacy and offline capabilities. It targets Vim users who prefer not to switch to NeoVim and want to utilize open-source models like Llama3 or Codellama.

How It Works

The plugin integrates with Ollama via its REST API using Python scripts (complete.py, chat.py). These scripts handle code completion and chat interactions, respectively. Vim communicates with these scripts through standard input/output redirection, seamlessly embedding AI-generated suggestions and chat responses directly into the Vim editing experience.

Quick Start & Requirements

  • Installation: Use a Vim plugin manager (e.g., vim-plug: Plug 'gergap/vim-ollama').
  • Prerequisites: Python 3.x, Ollama server running locally. The plugin can automatically create a Python virtual environment and install dependencies (httpx, requests, jinja2) via a setup wizard (:Ollama setup).
  • Setup Time: Minimal, primarily dependent on Ollama setup and model download.
  • Docs: :help vim-ollama within Vim.

Highlighted Details

  • Offers intelligent AI-based code completion, integrated chat, and automatic code editing based on natural language.
  • Supports interactive acceptance of changes via inline-diff view or a Git-based workflow with vim-fugitive.
  • Prioritizes Vim compatibility, explicitly stating it does not support NeoVim.
  • Includes a setup wizard for easier configuration and Python virtual environment management.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

This plugin is strictly for Vim and does not support NeoVim. Adding support for new, unsupported code completion models requires manual creation of JSON configuration files.

Health Check
Last commit

3 days ago

Responsiveness

1 week

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

Explore Similar Projects

Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Former Cofounder of Luma AI), Will Brown Will Brown(Research Lead at Prime Intellect), and
7 more.

avante.nvim by yetone

0.7%
16k
Neovim plugin emulating Cursor AI IDE for AI-driven code assistance
created 1 year ago
updated 1 day ago
Feedback? Help us improve.