feat: add pre-commit

This commit is contained in:
yetone 2024-08-15 10:33:22 +08:00
parent 91b54af2a7
commit c4bc1a21a7
No known key found for this signature in database
GPG Key ID: 222BA52B342D52AA
2 changed files with 23 additions and 1 deletions

11
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v0.20.0
hooks:
- id: stylua # or stylua-system / stylua-github

View File

@ -127,6 +127,17 @@ The following key bindings are available for use with `avante.nvim`:
Contributions to avante.nvim are welcome! If you're interested in helping out, please feel free to submit pull requests or open issues. Before contributing, ensure that your code has been thoroughly tested.
## Development
To set up the development environment:
1. Install [StyLua](https://github.com/JohnnyMorganz/StyLua) for Lua code formatting.
2. Install [pre-commit](https://pre-commit.com) for managing and maintaining pre-commit hooks.
3. After cloning the repository, run the following command to set up pre-commit hooks:
```sh
pre-commit install --install-hooks
```
## License
avante.nvim is licensed under the MIT License. For more details, please refer to the [LICENSE](./LICENSE) file.
avante.nvim is licensed under the Apache License. For more details, please refer to the [LICENSE](./LICENSE) file.