oakmac / oakmac/standard-clojure-style-js

Very strange intendation within a let form (probably bug)

Open
#169 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
137
Forks
8
PR merge metrics
No merged PRs in 30d

Description

When indenting a simple form like this, the result is predictable and good looking:

(filter
  #(not= 1 %) [1 2 3])

This is exactly what I'd expect to get within a let form, but the result looks like this, which is quite bad.

image

But if you try hard enough, you can make it even worse, this is just omg:

image

Done using the piping using Emacs + apheleia.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the indentation behavior shown for a simple form and the equivalent form inside let, using Emacs with Apheleia. Start by locating the formatter entry point for Clojure indentation; done means let forms produce consistently readable indentation comparable to the standalone example.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, emacs, javascript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.