Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
chore: add treefmt formatting (nix fmt + pre-commit + CI check)#4
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| /.* | ||
| !/.gitignore | ||
| !/.github/ | ||
| !/.tidyrc.json | ||
| !/.lua-format | ||
| /output/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # LuaFormatter config for the hand-written FFI under src/. | ||
| # 2-space indent. Keep simple functions on one line; column_limit sits a few | ||
| # columns under luacheck's 130 limit because lua-format under-counts the leading | ||
| # indent and trailing comma, so this keeps every emitted line within 130. | ||
| indent_width: 2 | ||
| use_tab: false | ||
| column_limit: 126 | ||
| continuation_indent_width: 2 | ||
| keep_simple_function_one_line: true | ||
| keep_simple_control_block_one_line: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "importSort": "source", | ||
| "importWrap": "source", | ||
| "indent": 2, | ||
| "operatorsFile": null, | ||
| "ribbon": 1, | ||
| "typeArrowPlacement": "first", | ||
| "unicode": "source", | ||
| "width": 80 | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,8 +12,7 @@ module Effect.Exception | ||
| , throw | ||
| , throwException | ||
| , try | ||
| ) | ||
| where | ||
| ) where | ||
| import Prelude | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| { pkgs, ... }: | ||
| { | ||
| projectRootFile = "flake.nix"; | ||
| # Nix — RFC 166 formatter. | ||
| programs.nixfmt.enable = true; | ||
| # Dhall — spago.dhall / packages.dhall layout. | ||
| programs.dhall.enable = true; | ||
| # PureScript — purs-tidy is not a first-class treefmt program, so wire it via | ||
| # the generic mechanism. It picks up `.tidyrc.json` from the project root. | ||
| settings.formatter.purs-tidy = { | ||
| command = "${pkgs.purs-tidy}/bin/purs-tidy"; | ||
| options = [ "format-in-place" ]; | ||
| includes = [ "*.purs" ]; | ||
| }; | ||
| # Lua FFI — LuaFormatter keeps the parentheses pslua's foreign-file parser | ||
| # requires (unlike StyLua, which strips them). Config in `.lua-format`. | ||
| settings.formatter.lua-format = { | ||
| command = "${pkgs.luaformatter}/bin/lua-format"; | ||
| options = [ | ||
| "-i" | ||
| "-c" | ||
| ".lua-format" | ||
| ]; | ||
| includes = [ "*.lua" ]; | ||
| }; | ||
| # Never format generated output or vendored trees. | ||
| settings.global.excludes = [ | ||
| "dist/*" | ||
| "output/*" | ||
| ".spago/*" | ||
| "node_modules/*" | ||
| "*.lock" | ||
| "flake.lock" | ||
| "spago.lock" | ||
| ".tidyrc.json" | ||
| ".lua-format" | ||
| ]; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.