Skip to content
Commit c3ed28b4 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Add a formatting plugin

This is a new plugin that can format code in two ways:
- Automatic formatting on save
- Via a single exposed action named "Format Document"

Supported formatters
- clang-format
- prettier
- dartfmt
- rustfmt
- xmllint for xml
- jq for json
- go fmt

Compared to 'External Tools', this is a lot nicer to use in my opinion
because
- it provides a single interface to do formatting
- it applies formatting as a patch on top of the document which
  helps retaining the undo history and provides an easy way to
  undo the changes quickly.
- has more control, for e.g., with clang-format it is able to format
  only the changed lines of a document and not the whole document
parent 76897c54
Pipeline #293161 passed with stage
in 8 minutes and 39 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment