Skip to content

Commit

Permalink
doc: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoshihou514 authored Jan 3, 2025
1 parent b40fdce commit 90aceab
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ Async formatting and linting utility for neovim `0.10+`.

## Features

- Blazingly fast
- Async using coroutine and luv spawn
- Async and blazingly fast
- Builtin support for popular formatters and linters
- Easy configuration for custom tools
- Minimal API allowing for full customization
- Light-weight

## Usage
Expand Down Expand Up @@ -64,8 +63,12 @@ vim.g.guard_config = {
}
```

- Use `Guard fmt` to manually call format, when there is a visual selection only the selection is formatted. **NOTE**: Regional formatting just sends your selection to the formatter, if there's not enough context incoherent formatting might occur (e.g. indent being erased)
- Use `Guard fmt` to manually call format, when there is a visual selection only the selection is formatted. **NOTE**: Regional formatting is best-effort, expect inconsistencies.
- `enable-fmt`, `disable-fmt` turns auto formatting on and off for the current buffer.
- Use `Guard Lint` to lint manually.
- `enable-lint` and `disable-lint` controls auto linting for the current buffer.

## Examples

Format c files with clang-format and lint with clang-tidy:

Expand Down Expand Up @@ -95,9 +98,6 @@ Lint all your files with `codespell`
ft('*'):lint('codespell')
```

- Use `Guard Lint` to lint manually.
- `enable-lint` and `disable-lint` controls auto linting for the current buffer.

You can also easily create your own configuration that's not in `guard-collection`, see [CUSTOMIZE.md](./CUSTOMIZE.md).

For more niche use cases, [ADVANCED.md](./ADVANCED.md) demonstrates how to:
Expand Down

0 comments on commit 90aceab

Please sign in to comment.