← all repositories
Bryley/neoai.nvim

Neovim's ChatGPT sidekick, minus the browser tab

A Lua plugin that embeds OpenAI chat into your editor with three distinct interaction modes, because context-switching is the real productivity killer.

neoai.nvim
Velocity · 7d
+0.5
★ / day
Trend
steady
star history

What it does NeoAI is a Neovim plugin for querying OpenAI’s GPT models without leaving your editor. It offers a chat GUI, a context-aware mode that feeds selected code or text into the prompt, and an “inject” mode that silently inserts AI output at your cursor. It also includes two built-in shortcuts: one that rewrites selected text for clarity, and another that auto-generates git commit messages from staged diffs.

The interesting bit The plugin’s “inject mode” is the standout: no GUI, no window juggling, just a command that sends a prompt and pastes the response directly into your buffer. The README also notes that all output auto-saves to the g register and code snippets to the c register — a small but thoughtful touch for vim register enthusiasts who’d rather yank than re-request.

Key highlights

  • Three interaction modes: Normal GUI chat, Context mode with visual selection, and headless Inject mode
  • Built-in shortcuts for text summarization (<leader>as) and git commit generation (<leader>ag)
  • Output automatically routed to vim registers (g for full text, c for code snippets)
  • Configurable model parameters and custom prompt templates via Lua setup
  • Requires nui.nvim dependency and curl on the system

Caveats

  • The README carries an early-project warning: “in early it’s early changes and is subject to change” — grammatical errors included at no extra charge
  • No explicit mention of non-OpenAI providers; the models table structure suggests extensibility but only OpenAI is documented
  • The git commit shortcut pulls git diff --cached on every invocation, which the README itself cautions could rack up API costs with large staged changes

Verdict Worth a look if you want ChatGPT in Neovim and prefer Lua configuration. Skip it if you need local/self-hosted models or a polished, stable API — this is still finding its footing.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.