This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-28
Channels
- # aleph (3)
- # beginners (10)
- # boot (135)
- # clara (2)
- # cljsjs (2)
- # cljsrn (1)
- # clojure (68)
- # clojure-austin (4)
- # clojure-france (2)
- # clojure-japan (1)
- # clojure-spec (30)
- # clojure-uk (11)
- # clojurescript (48)
- # component (65)
- # cursive (5)
- # datomic (40)
- # dirac (5)
- # emacs (3)
- # events (16)
- # funcool (2)
- # klipse (46)
- # lein-figwheel (2)
- # luminus (8)
- # off-topic (4)
- # om (7)
- # other-languages (4)
- # parinfer (21)
- # re-frame (15)
- # reagent (30)
- # ring (1)
- # ring-swagger (9)
- # rum (3)
- # specter (7)
- # test-check (8)
- # testing (5)
- # vim (21)
- # yada (4)
Is this the best way to connect a figwheel repl with cursive? https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
I don’t know if it’s the best way, but it works well for me. Few things I did differently from that wiki and it still works:
- I use latest version for all the dependencies
- I don’t need to remove lein-fighweel
from :plugins
as it suggests
@cfleming I’d like to suggest a better way to indent code:
(def current-ugly-indent
[:.vims-list {:position :absolute
:margin-top :25px
:margin-left :-400px
:padding :20px
:background :lightgrey
:border-radius :5px}
[:.container
[:&:after {:position :absolute
:top :-5px
:left :9px
:border-bottom "5px solid black"
:border-right "5px solid transparent"
:border-left "5px solid transparent"
:content "''"
:line-height 0
:font-size 0}]
[:.title]
[:.list {:display :flex
:flex-direction :column
:overflow-y :scroll}
[:.row {:display :flex
:margin-top :10px}
[:&:first-child {:margin-top 0}]]]]])
(def pretty-indent
[:.vims-list {:position :absolute
:margin-top :25px
:margin-left :-400px
:padding :20px
:background :lightgrey
:border-radius :5px}
[:.container
[:&:after {:position :absolute
:top :-5px
:left :9px
:border-bottom "5px solid black"
:border-right "5px solid transparent"
:border-left "5px solid transparent"
:content "''"
:line-height 0
:font-size 0}]
[:.title]
[:.list {:display :flex
:flex-direction :column
:overflow-y :scroll}
[:.row {:display :flex
:margin-top :10px}
[:&:first-child {:margin-top 0}]]]]])
This is about aligning not only pairs in relation to their neighbors (like let), but neighbor's children in relation to each other.
another example:
;; ugly
(let [props {:slices (:vims.derived/slices vims)
:playback-speed playback-speed}
callbacks {:on-play #(.play this)
:on-pause #(.pause this)}])
;; VS
;; pretty
(let [props {:slices (:vims.derived/slices vims)
:playback-speed playback-speed}
callbacks {:on-play #(.play this)
:on-pause #(.pause this)}])