Skip to content

Wrong let indentation #308

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No 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? No Sign in to your account

Closed
Malabarba opened this issue Jul 26, 2015 · 5 comments
Closed

Wrong let indentation #308

Malabarba opened this issue Jul 26, 2015 · 5 comments

Comments

@Malabarba
Copy link
Member

This is how clojure-mode indents the following form.

(let [{{{sha :sha} :head} :pull_request,
       {{user :login} :owner, :as repo} :repository} body
       base-analysis (something repo)]
  ...)

It's a pretty complicated destructuring, but the important point is that the indentation engine is indenting base-analysis as if it were part of the map above it, but it's really a whole new let-bind.

@bbatsov
Copy link
Member

bbatsov commented Jul 26, 2015

That's not an isolated case - pretty much every more complex scenario breaks the indentation as so much was originally copy/pasted or inherited from lisp-mode. Everything needs to be examined and re-engineered, but I don't see this happening any time soon.

@bbatsov
Copy link
Member

bbatsov commented Jul 26, 2015

See also #45 and #270

@Malabarba
Copy link
Member Author

It's not a huge deal anyway. :)

@bbatsov
Copy link
Member

bbatsov commented Jul 27, 2015

Yeah, I guess. Still, sooner or later we need to clean up the indentation mess. Like CIDER, clojure-mode was put together rather quickly and still carries quite the legacy around. But on the positive side, we're always making progress, albeit a bit slowly.

@Malabarba
Copy link
Member Author

Yeah, I tried to write an indent-line function for ahk scripts a couple of years ago and I know how nasty they can be.

No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants