Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Neovim
  3. conform.nvim

conform.nvim

MITLuav9.1.0

A lightweight Neovim plugin that formats code by calculating minimal diffs to preserve extmarks, folds, and viewport stability.

GitHubGitHub
5.3k stars302 forks0 contributors

What is conform.nvim?

conform.nvim is a Neovim plugin that formats source code by calculating minimal diffs instead of replacing entire buffers. It solves the problem of formatting disrupting the editor state—such as clobbering extmarks, folds, and causing viewport jumps—by applying changes precisely where needed. It works with a wide array of external formatters and integrates with LSP formatting.

Target Audience

Neovim users who want reliable, non-disruptive code formatting that preserves their editing context, especially those using LSP servers or multiple formatters per filetype.

Value Proposition

Developers choose conform.nvim because it uniquely maintains editor stability during formatting, fixes misbehaving LSP formatters, and adds range formatting to tools that lack it, all through a simple and familiar API.

Overview

Lightweight yet powerful formatter plugin for Neovim

Use Cases

Best For

  • Neovim users frustrated by formatting causing cursor jumps or losing folds
  • Teams using LSP servers with aggressive whole-buffer formatting
  • Developers needing range formatting for formatters without native support
  • Editing markdown with embedded code blocks that require formatting
  • Configuring multiple sequential formatters per filetype (e.g., isort then black for Python)
  • Maintaining a consistent formatting workflow across diverse languages and tools

Not Ideal For

  • Developers using Neovim versions prior to 0.10
  • Teams that rely on LSP code actions like :EslintFixAll for formatting
  • Projects where formatting is handled entirely outside the editor in CI/CD pipelines
  • Users editing in multiple editors who need a cross-editor formatting solution

Pros & Cons

Pros

Minimal Diff Formatting

Calculates and applies only necessary changes using LSP utilities, preserving extmarks, folds, and cursor position to prevent viewport jumps, as detailed in the README's features.

LSP Formatter Fixes

Intercepts and corrects LSP servers that replace entire buffers, turning them into piecewise edits to avoid clobbering editor state, explicitly mentioned in the README.

Universal Range Formatting

Enables range formatting for any formatter, even those lacking native support, by computing minimal diffs, as explained in the advanced topics section.

Simple Familiar API

Provides an imperative API modeled after vim.lsp.buf.format(), making integration straightforward for existing Neovim workflows, with examples in the setup guide.

Cons

LSP Command Limitations

Cannot run LSP commands or code actions as formatters, a admitted limitation in the FAQ, which restricts integration with some LSP-based fixing tools.

Neovim Version Lock-in

Requires Neovim 0.10 or higher, forcing users on older versions to downgrade or miss out, with no built-in fallback for compatibility.

External Tool Dependency

Relies entirely on external formatter executables being installed and configured, which adds setup complexity and potential points of failure, as noted in the formatters list.

Frequently Asked Questions

Quick Stats

Stars5,274
Forks302
Contributors0
Open Issues89
Last commit2 months ago
CreatedSince 2023

Tags

#developer-tools#code-formatter#neovim-plugin#lsp-integration#nvim-plugin#vim-plugins#neovim#nvim

Built With

N
Neovim
L
Lua

Included in

Neovim20.6k
Auto-fetched 3 hours ago

Related Projects

neoformatneoformat

:sparkles: A (Neo)vim plugin for formatting code.

Stars2,047
Forks181
Last commit3 months ago
formatter.nvimformatter.nvim

Formatter.nvim is a Neovim plugin that runs external code formatters on your files. It provides a flexible and asynchronous way to format code across many languages, helping developers maintain consistent code style without leaving the editor. ## Key Features - **Asynchronous Execution** — Runs formatters in the background without blocking the editor. - **Buffer Locking** — Prevents modifications during formatting with lock commands. - **Opt-in Default Configurations** — Includes pre-built formatter setups for common filetypes that you can choose to use. - **Conditional Formatting** — Allows formatter configurations to include logic for when to run. - **Before/After Hooks** — Execute custom code before and after formatting via autocommands. - **Filetype-specific Setup** — Configure different formatters per filetype with ordered execution. ## Philosophy Formatter.nvim believes in providing a robust, non-blocking formatting experience while giving users full control over their configurations, avoiding assumptions about preferred tools.

Stars1,456
Forks145
Last commit1 year ago
guard.nvimguard.nvim

Lightweight, fast and async formatting and linting plugin for Neovim

Stars519
Forks26
Last commit5 months ago
prettier.nvimprettier.nvim

Prettier plugin for Neovim's built-in LSP client.

Stars316
Forks10
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub