A lightweight Neovim plugin that formats code by calculating minimal diffs to preserve extmarks, folds, and viewport stability.
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.
Neovim users who want reliable, non-disruptive code formatting that preserves their editing context, especially those using LSP servers or multiple formatters per filetype.
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.
Lightweight yet powerful formatter plugin for Neovim
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.
Intercepts and corrects LSP servers that replace entire buffers, turning them into piecewise edits to avoid clobbering editor state, explicitly mentioned in the README.
Enables range formatting for any formatter, even those lacking native support, by computing minimal diffs, as explained in the advanced topics section.
Provides an imperative API modeled after vim.lsp.buf.format(), making integration straightforward for existing Neovim workflows, with examples in the setup guide.
Cannot run LSP commands or code actions as formatters, a admitted limitation in the FAQ, which restricts integration with some LSP-based fixing tools.
Requires Neovim 0.10 or higher, forcing users on older versions to downgrade or miss out, with no built-in fallback for compatibility.
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.
:sparkles: A (Neo)vim plugin for formatting code.
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.
Lightweight, fast and async formatting and linting plugin for Neovim
Prettier plugin for Neovim's built-in LSP client.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.