From c4bc1a21a7b2d08489da35b880042189ef2935d0 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 15 Aug 2024 10:33:22 +0800 Subject: [PATCH] feat: add pre-commit --- .pre-commit-config.yaml | 11 +++++++++++ README.md | 13 ++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..af9e652 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 diff --git a/README.md b/README.md index d123dd1..1298e88 100644 --- a/README.md +++ b/README.md @@ -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.