diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ce034802..0e7b1d54 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -39,3 +39,13 @@ jobs: - name: Rustfmt run: cargo +nightly fmt --all -- --check + + stylua: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: JohnnyMorganz/stylua-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: latest + args: --color always --check . diff --git a/.styluaignore b/.styluaignore new file mode 100644 index 00000000..d8e2f141 --- /dev/null +++ b/.styluaignore @@ -0,0 +1,2 @@ +# this file caused some issues with the build system +yazi-plugin/preset/plugins/mime.lua diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 00000000..ffaa2031 --- /dev/null +++ b/stylua.toml @@ -0,0 +1,6 @@ +indent_width = 2 +call_parentheses = "NoSingleTable" +collapse_simple_statement = "FunctionOnly" + +[sort_requires] +enabled = true