back to home

stevearc / conform.nvim

Lightweight yet powerful formatter plugin for Neovim

4,976 stars
280 forks
86 issues
LuaPythonShell

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing stevearc/conform.nvim in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/stevearc/conform.nvim)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

conform.nvim Lightweight yet powerful formatter plugin for Neovim • Requirements • Features • Installation • Setup • Formatters • Customizing formatters • Magic strings • Recipes • Debugging • Advanced topics • Options • Formatter options • API • setup(opts) • format(opts, callback) • list_formatters(bufnr) • list_formatters_to_run(bufnr) • list_all_formatters() • get_formatter_info(formatter, bufnr) • FAQ • Acknowledgements Requirements • Neovim 0.10+ (for older versions, use a nvim-0.x branch) Features • **Preserves extmarks and folds** - Most formatters replace the entire buffer, which clobbers extmarks and folds, and can cause the viewport and cursor to jump unexpectedly. Conform calculates minimal diffs and applies them using the built-in LSP format utilities. • **Fixes bad-behaving LSP formatters** - Some LSP servers are lazy and simply replace the entire buffer, leading to the problems mentioned above. Conform hooks into the LSP handler and turns these responses into proper piecewise changes. • **Enables range formatting for all formatters** - Since conform calculates minimal diffs, it can perform range formatting even if the underlying formatter doesn't support it. • **Simple API** - Conform exposes a simple, imperative API modeled after . • **Formats embedded code blocks** - Can format code blocks inside markdown files or similar (see injected language formatting) Installation conform.nvim supports all the usual plugin managers lazy.nvim For a more thorough configuration involving lazy-loading, see Lazy loading with lazy.nvim. Packer Paq vim-plug dein Pathogen Neovim native package Setup At a minimum, you will need to set up some formatters by filetype Then you can use just like you would . For example, to format on save: As a shortcut, conform will optionally set up this format-on-save autocmd for you See conform.format() for more details about the parameters. Conform also provides a formatexpr, same as the LSP client: To view configured and available formatters, as well as to see the log file, run Formatters You can view this list in vim with Expand to see all formatters • air - R formatter and language server. • alejandra - The Uncompromising Nix Code Formatter. • ansible-lint - ansible-lint with --fix. • asmfmt - Go Assembler Formatter • ast-grep - A CLI tool for code structural search, lint and rewriting. Written in Rust. • astyle - A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective-C, C#, and Java Source Code. • auto_optional - Adds the Optional type-hint to arguments where the default value is None. • autocorrect - A linter and formatter to help you to improve copywriting, correct spaces, words, and punctuations between CJK. • autoflake - Removes unused imports and unused variables as reported by pyflakes. • autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide. • bake - A Makefile formatter and linter. • bean-format - Reformat Beancount files to right-align all the numbers at the same, minimal column. • beautysh - A Bash beautifier for the masses. • bibtex-tidy - Cleaner and Formatter for BibTeX files. • bicep - Bicep is a Domain Specific Language (DSL) for deploying Azure resources declaratively. • biome - A toolchain for web projects, aimed to provide functionalities to maintain them. This config runs formatting *only*. See or for other options. • biome-check - A toolchain for web projects, aimed to provide functionalities to maintain them. This config runs formatting, linting and import sorting. See or for other options. • biome-organize-imports - A toolchain for web projects, aimed to provide functionalities to maintain them. This config runs import sorting *only*. See or for other options. • black - The uncompromising Python code formatter. • blade-formatter - An opinionated blade template formatter for Laravel that respects readability. • blue - The slightly less uncompromising Python code formatter. • bpfmt - Android Blueprint file formatter. • bsfmt - A code formatter for BrighterScript (and BrightScript). • buf - A new way of working with Protocol Buffers. • buildifier - buildifier is a tool for formatting bazel BUILD and .bzl files with a standard convention. • cabal_fmt - Format cabal files with cabal-fmt. • caramel_fmt - Format Caramel code. • cbfmt - A tool to format codeblocks inside markdown and org documents. • cedar - Formats cedar policies. • clang-format - Tool to format C/C++/… code according to a set of rules and heuristics. • cljfmt - cljfmt is a tool for detecting and fixing formatting errors in Clojure code. • cljstyle - Formatter for Clojure code. • cmake_format - Parse cmake listfiles and format them nicely. • codeql - Format queries and libraries with CodeQL. • codespell - Check code for common misspellings. • commitmsgfmt - Formats commit messages better than fmt(1) and Vim. • crlfmt - Formatter for CockroachDB's additions to the Go style guide. • crystal - Format Crystal code. • csharpier - The opinionated C# code formatter. • css_beautify - Beautifier for css. • cue_fmt - Format CUE files using command. • d2 - D2 is a modern diagram scripting language that turns text to diagrams. • darker - Run black only on changed lines. • dart_format - Replace the whitespace in your program with formatting that follows Dart guidelines. • dcm_fix - Fixes issues produced by dcm analyze, dcm check-unused-code or dcm check-dependencies commands. • dcm_format - Formats .dart files. • deno_fmt - Use Deno to format TypeScript, JavaScript/JSON and markdown. • dfmt - Formatter for D source code. • dioxus - Format snippets in Rust files. • djlint - ✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang. • docformatter - docformatter automatically formats docstrings to follow a subset of the PEP 257 conventions. • dockerfmt - Dockerfile formatter. a modern dockfmt. • docstrfmt - reStructuredText formatter. • doctoc - Generates table of content…