Skip to content

Commit

Permalink
doc: add a features section to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Sep 13, 2023
1 parent 00a5288 commit 7568de6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Lightweight yet powerful formatter plugin for Neovim
<!-- TOC -->

- [Requirements](#requirements)
- [Features](#features)
- [Installation](#installation)
- [Setup](#setup)
- [Formatters](#formatters)
Expand All @@ -24,6 +25,13 @@ Lightweight yet powerful formatter plugin for Neovim

- Neovim 0.8+

## 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 `vim.lsp.buf.format()`.

## Installation

conform.nvim supports all the usual plugin managers
Expand Down

0 comments on commit 7568de6

Please sign in to comment.