Comments (8)
This does seem like it would be a good optional feature. You would need to write a formatting rule that looks for maps and various kinds of bindings with alternating pairs, then figure out how much whitespace needed to be between each binding to align with the longest one.
from cljstyle.
Just kidding, @dparis is going to take a stab at it. I know this because I work with him. You're on the hook now, buddy.
from cljstyle.
Update: I've gotten a first pass implementation up on my fork https://github.com/dparis/cljstyle/pull/1/files
There are a few known cases that aren't working that I still need to fix, and I'd like to do a code quality pass, but overall seems to work decently. I'll submit a PR against upstream once those things are sorted out.
from cljstyle.
Looks like cljfmt
has had a WIP PR open for a while for this: weavejester/cljfmt#77
from cljstyle.
I personally would like that to be doable both ways if possible (via config), turn a vertical style code base into "normal" alignement or the inverse.
from cljstyle.
Excellent. Here's the prior art:
- Clojure Mode for Emacs: https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L1246
- Calva's formatter eventually just calls a fork of cljfmt: https://github.com/PEZ/cljfmt/blob/master/cljfmt/src/cljfmt/core.cljc#L497
from cljstyle.
I'll take a stab at this when I have some time.
from cljstyle.
Hi guys, i was just trying enable this in cljstyle and bumped in this issue and there is a help-needed label, is there a way to help in this?
from cljstyle.
Related Issues (20)
- "Bad CPU type in executable" when installed on Apple Silicon Mac HOT 3
- Unable to install from Dockerfile / alpine based HOT 4
- cljstyle-0.16.626.jar manifest does not specify Main-Class HOT 7
- Binary doesn't work on the latest macOS GitHub Action Runner machines
- Provide uberjar as a release artifact?
- cljstyle eats comment boxes
- Doc improvement suggestion - the `:inner` rule examples
- Doc improvement suggestion - the use of cljstyle in GitHub Actions workflows
- Increasing file line-length or column length above 80 HOT 1
- Make everything inner, but keep multi-arity alignment HOT 1
- [question] Adding line breaks in defn-like symbols HOT 1
- Run w/ tools.deps example has some issues
- Ability to make :eof-newline force only one newline at the end of a file
- Add options to ignore comments and discards
- Respect the :style/indent metadata on custom macros
- java.lang.IllegalArgumentException: Argument of type: class rewrite_clj.reader.NewlineNormalizingReader cannot be converted to IPushbackReaderFailed to process 1 files HOT 1
- Test failures on Windows
- cljstyle.edn HOT 1
- Change indentation for functions HOT 1
- :stair does not behave like documented when multiple arguments on first line
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cljstyle.