clojure-mode icon indicating copy to clipboard operation
clojure-mode copied to clipboard

Feature request: as-> highlighting

Open tanzoniteblack opened this issue 7 years ago • 3 comments

I was recently having to write a rather complex set of threading code with as-> and it occurred to me that it would be useful if in an as-> sexp, we set the font-face of the name of the bound value to a different font face than normal so that it stood out a bit.

Example:

Instead of

(as-> {:cat 5} x
  (reduce some-fn
          x
          (mapcat someother-fn some-val))
  (assoc x :dog 27)
  (map weird-fn x)
  (map x some-coll))

font-locked x with some special font-face so we can make it stand out to make it easier to quickly parse out this information.

I would consider this to be very low priority, but might be a nice to have.

tanzoniteblack avatar Aug 26 '16 21:08 tanzoniteblack

In that same thread, we could font-lock let-binds too. It's all a matter of developer time. :-)

Malabarba avatar Aug 29 '16 13:08 Malabarba

Indeed. I wouldn't add special font-locking for the bound variable here, unless this is something that we've done consistently everywhere else. (unlikely to happen unless someone volunteers to work on it).

bbatsov avatar Oct 03 '16 06:10 bbatsov

autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it

MalloZup avatar Aug 05 '19 21:08 MalloZup