Favicon of gen.nvim

gen.nvim

A Neovim plugin generates and edits text with Ollama models, customizable prompts, and follow-up chats using your editor's content.

Alternative to:

gen.nvim brings LLM text generation into Neovim for developers and writers who want AI help within their editor. It can work with a selected passage or the current buffer, so you can ask about or revise the content you're editing.

  • Text and code editing: Use prompts to improve grammar and spelling, expand text, or request code fixes, then replace the selected content with the result.
  • Custom prompts: Adapt existing prompts or create your own using editor content, file type, additional input, and copied text as context.
  • Follow-up chat: Ask further questions within a conversation while the model receives the conversation history; closing the response window ends that context.
  • Model choice: Choose among installed Ollama models, including llama3.2 and mistral, or assign a particular model to a prompt.
  • Response review: Read generated output in a floating window or editor split before accepting it, or let a prompt replace text automatically.

The plugin runs inside Neovim and requires Ollama and Curl. Ollama can run on your own machine or another host; editor content and conversation history go to that configured service. With a local Ollama service, those requests stay on your machine. gen.nvim is free and open source under The Unlicense.

Similar to gen.nvim