opencode.nvim  by NickvanDyke

Neovim integration for AI coding assistant

created 1 month ago
307 stars

Top 87.1% on SourcePulse

GitHubView on GitHub
Project Summary

This plugin integrates the opencode AI assistant with Neovim, providing a seamless way for developers to interact with AI models directly within their editor. It targets Neovim users who want to leverage AI for code generation, refinement, and contextual queries without leaving their workflow.

How It Works

The plugin connects to an opencode process, likely running as a separate TUI application. It intercepts user prompts, injects customizable editor context (like current buffer content, selections, or git diffs) into these prompts, and sends them to opencode. The responses are then displayed within Neovim, often in an embedded terminal or via notifications. This approach allows for flexible prompt engineering and context-aware AI assistance.

Quick Start & Requirements

  • Install via lazy.nvim or nixvim.
  • Requires snacks.nvim as a dependency.
  • Assumes an opencode process is running and accessible.
  • Official quick-start and configuration examples are provided in the README.

Highlighted Details

  • Supports auto-finding opencode processes within the current working directory or embedded terminals.
  • Offers customizable prompts and context injection using placeholders like @selection, @buffer, and @diff.
  • Provides integrated completion, highlighting, and normal-mode support for prompt refinement.
  • Forwards opencode Server-Sent-Events as Neovim autocmds for custom event handling.

Maintenance & Community

  • The project is maintained by NickvanDyke.
  • Inspired by nvim-aider and neopencode.nvim.

Licensing & Compatibility

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

Limitations & Caveats

The plugin relies on opencode's "currently undocumented, likely unstable API," which poses a risk of breakage with opencode updates. It also requires a separate opencode process to be running, adding an external dependency to the setup.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
13
Star History
212 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.6%
16k
Neovim plugin emulating Cursor AI IDE for AI-driven code assistance
created 1 year ago
updated 2 days ago
Starred by Jeffrey Morgan Jeffrey Morgan(Cofounder of Ollama), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
19 more.

codex by openai

3.0%
35k
Coding agent CLI tool for terminal-based chat-driven development
created 4 months ago
updated 19 hours ago
Feedback? Help us improve.