Skip to content

Conform.nvim

Conform.nvim is a powerful and efficient formatter plugin that provides fast, asynchronous formatting for your code with support for multiple formatters and languages.

What Problem Does It Solve?

Traditional code formatting in Neovim can be:

  • Slow and blocking
  • Inconsistent across languages
  • Difficult to configure
  • Not asynchronous
  • Limited in functionality

How It Improves Productivity

  1. Fast Formatting:

    • Asynchronous operation
    • Multiple formatter support
    • Quick execution
    • Non-blocking
  2. Easy Configuration:

    • Simple setup
    • Language-specific settings
    • Formatter selection
    • Custom rules
  3. Advanced Features:

    • Range formatting
    • Buffer formatting
    • Project-wide formatting
    • Formatter fallbacks

How to Use

Basic Usage

  • Use :Format to format current buffer
  • Use :FormatWrite to format and save
  • Use :FormatRange to format selection
  • Use :FormatInfo to see formatter info

Supported Formatters

  • Prettier
  • biome
  • Black
  • rustfmt (A tool for formatting Rust code)
  • rustywind (A formatter for Tailwind CSS)
  • isort
  • stylua
  • shfmt
  • Many more… See List

Configuration

  • Set up formatters per language 😍
  • Configure formatting rules
  • Set up formatter fallbacks
  • Customize formatting behavior