Flemma.Nvim

An AI workspace inside Neovim where every conversation is a document you own.

Last verified:

Visit Flemma.Nvim

What is Flemma.Nvim?

Flemma is a Neovim plugin that transforms your editor into a first-class AI workspace, designed specifically for writers, researchers, creators, and innovators rather than just as a coding assistant. The core innovation is that .chat files ARE the conversation - these are Markdown files with role markers (@You:, @Assistant:) that serve as the complete state, with no hidden database, JSON history, or server process required.

Key features include support for multiple LLM providers (Anthropic, OpenAI, Vertex AI, and Moonshot), the ability to switch providers mid-conversation, autonomous agent loops, tool calling with 7 built-in tools for shell commands and file operations, prompt caching that automatically places cache breakpoints, extended thinking/reasoning support, per-buffer overrides via frontmatter, Lua template expressions, file attachments, cost tracking, and a lualine.nvim component. The buffer is the state, making conversations portable, greppable, and version-controllable in Git.

Flemma treats .chat files as a proper filetype with its own parser, AST, LSP server, template engine, and sandboxed tool execution. You can close Neovim and reopen the file weeks later to pick up exactly where you left off. The plugin includes an approval flow for tool execution (Ctrl-] cycles through preview, execute, send) ensuring nothing runs without consent, and supports parallel tool use.

Flemma.Nvim pricing

Pricing model: Freemium

Flemma.nvim is a free, open-source Neovim plugin. There is no paid tier or subscription - you only pay the usage costs to your chosen AI provider (Anthropic, OpenAI, or Vertex AI). The plugin includes cost tracking to monitor your spending, prompt caching to reduce costs for long conversations, and all features are available without additional payment.

Flemma.Nvim pros

  • Buffer is the complete state - no hidden database or JSON history
  • Conversations are portable, greppable, and version-controllable in Git
  • Supports multiple LLM providers: Anthropic, OpenAI, Vertex AI, Moonshot
  • Switch providers mid-conversation seamlessly
  • Autonomous agent loops for complex tasks
  • 7 built-in tools for shell commands and file operations
  • Prompt caching automatically placed for significant cost savings
  • Extended thinking and reasoning support for all providers
  • Per-buffer overrides via frontmatter for file-specific settings
  • Tool execution approval flow ensures nothing runs without consent
  • Parallel tool use supported
  • Open registration APIs for custom providers and tools
  • Lua template expressions for reusable prompts
  • File attachments supported
  • Cost tracking built-in
  • lualine.nvim component for status display
  • Custom tools can resolve definitions asynchronously from CLI or remote APIs

Flemma.Nvim cons

  • UI still being refined for long agent sessions (not quite there yet)
  • Requires Neovim setup and configuration
  • Primarily designed for writers/researchers, not optimized as coding assistant
  • Custom tool setup requires technical knowledge
  • Only works with specific providers (Anthropic, OpenAI, Vertex, Moonshot)
  • Tool calling requires approval workflow which adds steps
  • mcporter support planned but not yet implemented
  • Long agent sessions UI could be improved further

Frequently asked questions about Flemma.Nvim

What is the core concept behind Flemma?

The fundamental idea is that a .chat file IS the conversation. There's no SQLite, JSON logs, or hidden state. What you see in the buffer is exactly what the model receives. You can edit assistant replies to fix hallucinations, delete tangents, or fork by duplicating the file - everything stays synchronized because there's nothing to fall out of sync.

Which AI providers does Flemma support?

Flemma works with Anthropic, OpenAI, and Vertex AI. It also supports Moonshot. You can switch providers mid-conversation, which is useful for research when you want multiple models' perspectives on a problem.

How does tool calling work in Flemma?

Models can run shell commands and read/edit/write files through 4 built-in tools. Results go directly into the buffer. There's an approval flow where Ctrl-] cycles through preview, execute, and send - nothing runs without your consent. Parallel tool use also works.

What is prompt caching and how does it help?

Flemma supports prompt caching for Anthropic, OpenAI, and Vertex AI. It automatically places cache breakpoints, making long conversations significantly cheaper. This was a major pain point that has been addressed, as long conversations used to be expensive.

How do per-buffer overrides work?

Through frontmatter, flemma.opt lets you pick which tools a buffer can use, set provider parameters, and switch models - all scoped to that one file. This allows file-specific customization without affecting other conversations.

Can I create custom tools?

Yes, Flemma has open registration APIs for both providers and tools. Custom tools can resolve definitions asynchronously from CLI subprocesses or remote APIs. The system is designed to be extensible.

Are conversations version-controllable?

Yes, since .chat files are just Markdown with role markers, they're fully portable, greppable, and version-controllable. The developer backs up conversations in Git. You can close Neovim and reopen the file weeks later to pick up exactly where you left off.

What is Flemma designed for?

Flemma is specifically designed for writers, researchers, creators, and innovators - not as a coding assistant. It's built for a broader range of uses beyond programming, focusing on general AI conversation and content creation.

Does Flemma have extended thinking support?

Yes, Flemma supports extended thinking and reasoning for all three providers (Anthropic, OpenAI, and Vertex AI). This allows models to show their reasoning process when they have that capability.

What makes Flemma different from other AI Neovim plugins?

The buffer is the state - there's no hidden database, JSON history, or server process. Conversations are plain Markdown files that you can edit, grep, and version control. It also offers provider-agnostic support with mid-conversation switching, autonomous agent loops, and a layered config system that gets out of your way.

Categories

Use cases

Browse all AI tools on NeedAnAI