soupglasses / alexandra Goto Github PK
View Code? Open in Web Editor NEWThis project forked from kamadorueda/alejandra
The Uncompromising Nix Code Formatter
Home Page: https://kamadorueda.github.io/alejandra/
License: The Unlicense
This project forked from kamadorueda/alejandra
The Uncompromising Nix Code Formatter
Home Page: https://kamadorueda.github.io/alejandra/
License: The Unlicense
A function attributes should have spaces when inlined:
{pkgs, ...}:
should become { pkgs, ... }:
.
While preferably I'd like to stick as close as possible to Alejandra, one of my largest pet peeves with Alejandra is how newline happy it is for many function attributes longer than one...
So, I propose to allow having multiple arguments inline, given that the line-length does not get too long.
This however would require building up new logic inside Alejandra to do this measurement of such an "inline" block. If this is done, it would make it a much harder diversion from Alejandra as a project, and Alexandra would no longer be a simple "Alejandra, but with spaces!" project which was its primary goal.
Feedback is welcome.
Example:
For example given the input of:
{ arg1, arg2, arg3, ... }:
Alejandra would format it onto 4 separate lines:
{
arg1,
arg2,
arg3,
...
}:
Consideration is to follow the precedent set by RFC 0166 for argument lists, which says notably the following:
As many arguments as possible must be fit onto the first line.
...
RFC 0166: Section for Function Application.
Which would allow the previous formatting to stay unchanged, as it is "small".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.