ollama.nvim  by nomnivore

Neovim plugin for managing Ollama workflows

created 1 year ago
537 stars

Top 59.9% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This Neovim plugin integrates with Ollama, enabling users to interact with local Large Language Models directly within their editor. It targets Neovim users who want to leverage LLMs for tasks like code generation, text completion, and content summarization without leaving their development environment. The plugin offers flexible configuration for connecting to Ollama servers and defining custom LLM prompts.

How It Works

The plugin communicates with an Ollama server via HTTP, allowing the server to run locally or remotely. Users can select available models, prompt LLMs with context from their current buffer (including selections, filetype, and surrounding text), and configure how responses are handled (display, replace, or insert). It supports custom parameters like temperature and top_k, and allows defining custom prompts with specific actions and response extraction patterns.

Quick Start & Requirements

  • Install via lazy.nvim (see README for full configuration example).
  • Requires nvim-lua/plenary.nvim as a dependency.
  • Requires curl to be installed on the system for HTTP communication.
  • Ollama server must be running and accessible via HTTP.

Highlighted Details

  • Flexible prompt system with support for context tokens ($input, $sel, $buf, etc.).
  • Multiple response handling actions: display, replace, insert, display_replace, display_insert.
  • Built-in action factory for easy customization of default actions.
  • Optional integration with stevearc/dressing.nvim for Telescope prompt selection.
  • Docker integration example provided for managing Ollama containers.
  • Status reporting for integration into statuslines (e.g., lualine.nvim).

Maintenance & Community

  • Developed by nomnivore.
  • Inspired by gen.nvim.
  • No explicit community links (Discord/Slack) or roadmap mentioned in the README.

Licensing & Compatibility

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

Limitations & Caveats

The plugin is currently missing planned features such as direct model download/management and chat functionality. The license is not specified, which may impact commercial adoption.

Health Check
Last commit

11 months ago

Responsiveness

1 week

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

Explore Similar Projects

Feedback? Help us improve.