Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: move configuration section above completions #408

Merged
merged 1 commit into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [Unreleased](https://github.com/hougesen/mdsf/compare/v0.2.1...HEAD)

- docs: move configuration section above completions [`#408`](https://github.com/hougesen/mdsf/pull/408)
- build(deps): bump clap_complete to 4.5.8 [`#407`](https://github.com/hougesen/mdsf/pull/407)
- build(deps): bump test-with to 0.13.0 [`#406`](https://github.com/hougesen/mdsf/pull/406)
- docs: changelog for ureleased prs [`#405`](https://github.com/hougesen/mdsf/pull/405)
- build(deps): bump clap to 4.5.9 [`#404`](https://github.com/hougesen/mdsf/pull/404)
Expand Down
122 changes: 61 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,67 +106,6 @@ Options:

<!-- END_SECTION:verify-command-help -->

### Shell completions

Shell completions can be generated using `mdsf completions <SHELL>`.

<!-- START_SECTION:completions-command-help -->

```
Generate shell completion

Usage: mdsf completions <SHELL>

Arguments:
<SHELL> [possible values: bash, elvish, fish, powershell, zsh]

Options:
-h, --help Print help
-V, --version Print version
```

<!-- END_SECTION:completions-command-help -->

#### Bash

Add the following to your `.bashrc`.

```bash
eval "$(mdsf completions bash)"
```

#### Bash

Add the following to your `.zshrc`.

```bash
eval "$(mdsf completions zsh)"
```

#### Fish

Add the following to `~/.config/fish/config.fish`.

```fish
mdsf completions fish | source
```

#### PowerShell

Add the following to your PowerShell configuration (Can be found by running `$PROFILE`).

```powershell
Invoke-Expression (&mdsf completions powershell)
```

#### Elvish

Add the following to `~/.elvish/rc.elv`.

```elvish
eval (mdsf completions elvish)
```

## 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.
Expand Down Expand Up @@ -379,6 +318,67 @@ mdsf init

<!-- END_SECTION:supported-tools -->

## Shell completions

Shell completions can be generated using `mdsf completions <SHELL>`.

<!-- START_SECTION:completions-command-help -->

```
Generate shell completion

Usage: mdsf completions <SHELL>

Arguments:
<SHELL> [possible values: bash, elvish, fish, powershell, zsh]

Options:
-h, --help Print help
-V, --version Print version
```

<!-- END_SECTION:completions-command-help -->

#### Bash

Add the following to your `.bashrc`.

```bash
eval "$(mdsf completions bash)"
```

#### Bash

Add the following to your `.zshrc`.

```bash
eval "$(mdsf completions zsh)"
```

#### Fish

Add the following to `~/.config/fish/config.fish`.

```fish
mdsf completions fish | source
```

#### PowerShell

Add the following to your PowerShell configuration (Can be found by running `$PROFILE`).

```powershell
Invoke-Expression (&mdsf completions powershell)
```

#### Elvish

Add the following to `~/.elvish/rc.elv`.

```elvish
eval (mdsf completions elvish)
```

## Acknowledgement

mdsf was inspired by the amazing neovim formatting plugin [conform.nvim](https://github.com/stevearc/conform.nvim).
Expand Down
4 changes: 2 additions & 2 deletions src/caching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mod test_get_config_hash {
use crate::{caching::get_config_hash, config::MdsfConfig};

#[test]
fn it_shoud_be_deterministic() {
fn it_should_be_deterministic() {
assert_eq!(
get_config_hash(&MdsfConfig::default()),
get_config_hash(&MdsfConfig::default()),
Expand All @@ -51,7 +51,7 @@ mod test_hash_text_block {
use crate::caching::hash_text_block;

#[test]
fn it_shoud_be_deterministic() {
fn it_should_be_deterministic() {
assert_eq!(
hash_text_block("mads was here"),
hash_text_block("mads was here"),
Expand Down
Loading