Fork me on GitHub
#cursive
<
2022-10-13
>
onetom03:10:09

if i have a function with a multi-line argument list, eg:

(defn handle-auth
  [{:as             req
    requesting-user :xxx/user
    claims          :jwt/claims
    params          :body-params}])
it appears in the Structure tool window and the File Structure popup on a single line. the newlines are removed from the function signature, BUT the spaces are not compacted, so it makes those windows horizontally scrollable, which is annoying. also, i can't see the full arg list, without scrolling to the far right. i think this format would be more useful:
(-> '[{:as             req
       requesting-user :xxx/user
       claims          :jwt/claims
       params          :body-params}]
    pr-str)
=> "[{:as req, requesting-user :xxx/user, claims :jwt/claims, params :body-params}]"

onetom03:10:19

maybe sprinkled with some unicode chars for even better readability:

(str/replace #"," " ·"))
=> "[{:as req · requesting-user :xxx/user · claims :jwt/claims · params :body-params}]"