You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plug-in has really shaped up! It helps make Clojure coding an even greater joy. I have noticed, however, that the threading operators, -> and ->>, are only replaced by pretty symbols when typing them. When a file that contains them is loaded, or when you use the Toggle Clojure Pretty Symbol action, they remain -> or ->>.
The text was updated successfully, but these errors were encountered:
Ah, understood. I like your idea. Is it possible to apply my "padding" solution only when the arguments span more than one line? I.e., maybe there's no need to pad if the function/macro name is the last symbol in the line, and there are arguments below. But you do need to pad if some arguments (typically just the first) are on the same line as the function name, and there are more args. below.
An aside: I don't think it's a common style, but I've actually come to prefer making the indentation of succeeding lines just two spaces instead of lining up with the first argument of the thread macros:
(->> "abc"
reverse
(apply str))
The reason is that the first argument, "abc", is fundamentally different from the others, as with many other forms like if. In the threading macros, the first arg. is the starting data, while remaining arguments are forms that work to transform it. In other words, the first arg. is special, but the others are peers, in a sense, and should line up.
Of course, the same cannot be said for many other functions or macros, like comp, not=, >=, <=, and, or, not, union, difference, intersection. In these, all the args. are peers, and should be indented so that they all line up. So, yes indeed, this fix is needed.
This plug-in has really shaped up! It helps make Clojure coding an even greater joy. I have noticed, however, that the threading operators,
->
and->>
, are only replaced by pretty symbols when typing them. When a file that contains them is loaded, or when you use the Toggle Clojure Pretty Symbol action, they remain->
or->>
.The text was updated successfully, but these errors were encountered: