docs: update contributing/formatting/tools
Some checks failed
buildbot/nix-build .#checks.aarch64-darwin Build done.
buildbot/nix-build .#checks.aarch64-linux Build done.
buildbot/nix-build .#checks.x86_64-darwin Build done.
buildbot/nix-build .#checks.x86_64-linux Build done.
buildbot/nix-eval Build done.

This commit is contained in:
dfh 2024-08-02 02:13:46 +00:00 committed by Auxolotl Wiki
parent ab61afad3a
commit a6fd265d0a

View file

@ -2,7 +2,7 @@
title: Formatting tools
description: How to format code in Aux
published: true
date: 2024-07-01T19:25:53.854Z
date: 2024-08-02T02:13:44.468Z
tags:
editor: markdown
dateCreated: 2024-05-19T12:41:51.196Z
@ -24,7 +24,7 @@ If you'd prefer to avoid treefmt, you can set up the language formatters manuall
### Nix
For Nix, use [`pkgs.nixfmt-rfc-style`](https://search.nixos.org/packages?channel=unstable&show=nixfmt-rfc-style&from=0&size=50&sort=relevance&type=packages&query=nixfmt-rfc-style).
For Nix, use [`pkgs.nixfmt-rfc-style`](https://search.nixos.org/packages?channel=unstable&show=nixfmt-rfc-style&type=packages).
`nixfmt-rfc-style` is based on [`nixfmt`](https://github.com/nixos/nixfmt), however its style differs significantly from the original nixfmt, as its style is based on [NixOS RFC 166](https://github.com/NixOS/rfcs/pull/166). Please don't use the original `nixfmt` style.
@ -33,7 +33,7 @@ For Nix, use [`pkgs.nixfmt-rfc-style`](https://search.nixos.org/packages?channel
If you're using flakes, you can set your nix formatter in your `flake.nix` outputs.
> As of nixpkgs release `23.11`, `nixfmt-rfc-style` is currently only available in unstable channels, so you may need to introduce an unstable nixpkgs input if you do not already have one.
> For nixpkgs release earlier than `24.05`, `nixfmt-rfc-style` is unavailable, so you may need to introduce an unstable nixpkgs input if you do not already have one.
{.is-info}
```nix
{
@ -64,7 +64,7 @@ $ nix fmt **/*.nix
##### With nix-shell
> As of nixpkgs release `23.11`, `nixfmt-rfc-style` is currently only available in unstable channels.
> For nixpkgs release earlier than `24.05`, `nixfmt-rfc-style` is unavailable, you must use an unstable channel.
{.is-info}
```
@ -79,7 +79,7 @@ $ nixfmt **/*.nix
##### With nix shell
> As of nixpkgs release `23.11`, `nixfmt-rfc-style` is currently only available in unstable channels.
> For nixpkgs release earlier than `24.05`, `nixfmt-rfc-style` is unavailable, you must use an unstable channel.
{.is-info}
```