Skip to content
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

Kamadorueda #264

Merged
merged 3 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
We integrate with common code editors:

- [Alejandra extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=kamadorueda.alejandra)
- [doom-emacs configuration](https://github.com/hlissner/doom-emacs): `(set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))`
- [Doom-emacs configuration](https://github.com/hlissner/doom-emacs): `(set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))`

## Getting started

Expand Down Expand Up @@ -146,6 +146,7 @@ Please visit: [search.nixos.org/packages?query=alejandra](https://search.nixos.o
```bash
$ nix-env -ivA aarch64-darwin -f https://github.com/kamadorueda/alejandra/tarball/1.1.0
$ nix-env -ivA aarch64-linux -f https://github.com/kamadorueda/alejandra/tarball/1.1.0
$ nix-env -ivA i686-linux -f https://github.com/kamadorueda/alejandra/tarball/1.1.0
$ nix-env -ivA x86_64-darwin -f https://github.com/kamadorueda/alejandra/tarball/1.1.0
$ nix-env -ivA x86_64-linux -f https://github.com/kamadorueda/alejandra/tarball/1.1.0
```
Expand All @@ -172,7 +173,7 @@ $ alejandra --help
outputs = {alejandra, nixpkgs, ...}: {
nixosConfigurations = {
example = nixpkgs.lib.nixosSystem rec {
# We support: aarch64-darwin, aarch64-linux, x86_64-darwin, x86_64-linux
# We support: aarch64-darwin, aarch64-linux, i686-linux, x86_64-darwin, x86_64-linux
system = "x86_64-linux";

modules = [
Expand All @@ -198,7 +199,7 @@ $ alejandra --help
url = "https://github.com/kamadorueda/alejandra/tarball/1.1.0";
sha256 = "0000000000000000000000000000000000000000000000000000";
}))
# Pick one from: aarch64-darwin, aarch64-linux, x86_64-darwin, x86_64-linux
# Pick one from: aarch64-darwin, aarch64-linux, i686-linux, x86_64-darwin, x86_64-linux
.x86_64-linux
.outPath;
in {
Expand Down Expand Up @@ -227,6 +228,8 @@ See why Alejandra was created
and a comparison between alternatives
[here](https://discourse.nixos.org/t/the-uncompromising-nix-code-formatter/17385/3?u=kamadorueda).

Alternatively, checkout the code examples of the different formatters [here](https://github.com/kamadorueda/rfc-0101).

## Versioning

We use [semver](https://semver.org/) to version Alejandra.
Expand All @@ -242,7 +245,35 @@ Our public API consists of:

## Changelog

Please see: [CHANGELOG.md](./CHANGELOG.md).
Please read: [CHANGELOG](./CHANGELOG.md).

## Contributors

The following people have helped improving Alejandra.

Thank you ❤️

- [Kevin Amado](https://github.com/kamadorueda) ~
[Email](mailto:kamadorueda@gmail.com),
[Patreon](https://www.patreon.com/kamadorueda),
@kamadorueda:[matrix.org](https://matrix.org/).
- [Thomas Bereknyei](https://github.com/tomberek).
- [Piegames](https://github.com/piegamesde).
- [Joachim Ernst](https://github.com/0x4A6F).
- [David Arnold](https://github.com/blaggacao).
- [David Hauer](https://github.com/DavHau).
- [Fabian Möller](https://github.com/B4dM4n).
- [Rok Garbas](https://github.com/garbas).
- [Yorick van Pelt](https://github.com/yorickvP).
- [Rehno Lindeque](https://github.com/rehno-lindeque).
- [Jörg Thalheim](https://github.com/Mic92).
- [Vincent Ambo](https://github.com/tazjin).
- [Mr Hedgehog](https://github.com/ModdedGamers).
- [Tristan Maat](https://github.com/TLATER).
- [Norbert Melzer](https://github.com/NobbZ).
- [Patrick Stevens](https://github.com/Smaug123).
- [Connor Baker](https://github.com/ConnorBaker).
- [Florian Finkernagel](https://github.com/TyberiusPrime).

## Footnotes

Expand Down
4 changes: 2 additions & 2 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ format_macro_bodies = true
format_macro_matchers = true
format_strings = true
hex_literal_case = "Lower"
imports_granularity = "Crate"
imports_layout = "HorizontalVertical"
imports_granularity = "Item"
imports_layout = "Vertical"
max_width = 80
normalize_comments = true
normalize_doc_attributes = true
Expand Down
5 changes: 4 additions & 1 deletion src/alejandra_cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ pub(crate) fn parse(args: Vec<String>) -> clap::ArgMatches {
Fabian Möller ~ @B4dM4n on GitHub.
Rok Garbas ~ @garbas on GitHub.
Yorick van Pelt ~ @yorickvP on GitHub.
Rehno Lindeque ~ @rehno-lindeque on GitHub.
Jörg Thalheim ~ @Mic92 on GitHub.
Vincent Ambo ~ @tazjin on GitHub.
Mr Hedgehog ~ @ModdedGamers on GitHub.
Tristan Maat ~ @TLATER on GitHub.
Norbert Melzer ~ @NobbZ on GitHub.
Patrick Stevens ~ @Smaug123 on GitHub.
Connor Baker ~ @ConnorBaker on GitHub.
Florian Finkernagel ~ @TyberiusPrime on GitHub.

Your star and feedback is very much appreciated!
Expand Down Expand Up @@ -132,7 +134,8 @@ pub(crate) fn simple(paths: Vec<String>, quiet: bool) -> Vec<FormattedPath> {

pub(crate) fn tui(paths: Vec<String>) -> std::io::Result<Vec<FormattedPath>> {
use rayon::prelude::*;
use termion::{input::TermRead, raw::IntoRawMode};
use termion::input::TermRead;
use termion::raw::IntoRawMode;

enum Event {
FormattedPath(FormattedPath),
Expand Down