From 6020663833ebb06c4540443421dd848e5da0930e Mon Sep 17 00:00:00 2001 From: Mads Hougesen Date: Sat, 9 Mar 2024 01:12:11 +0100 Subject: [PATCH] docs: setup guide (#39) --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index b1c20ab..84f873d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,39 @@ # mdsf Format markdown code snippets using your favorite code formatters. + +## Installation + +The latest version of `mdsf` can be downloaded directly from [github.com/hougesen/mdsf/releases](https://github.com/hougesen/mdsf/releases). + +### Cargo + +Install using the [published crate](https://crates.io/crates/mdsf): + +```sh +cargo install mdsf +``` + +or directly from source: + +```sh +git clone git@github.com:hougesen/mdsf.git + +cargo install --path ./mdsf --bin mdsf +``` + +## Usage + +```sh +mdsf format NAME_OF_FOLDER_OR_FOLDER +``` + +## Configuration + +The default configuration of `mdsf` aims to as sane as possible. For that reason the default formatter for each language is the one most people have installed. + +If you are interested in customizing which formatter is run, you can create a new `mdsf` configuration file by running + +```sh +mdsf init +```