This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-31
Channels
- # announcements (3)
- # beginners (139)
- # boot (28)
- # cider (40)
- # cljdoc (1)
- # cljs-dev (30)
- # clojure (61)
- # clojure-conj (1)
- # clojure-dev (113)
- # clojure-germany (4)
- # clojure-italy (29)
- # clojure-nl (3)
- # clojure-russia (2)
- # clojure-spec (38)
- # clojure-uk (53)
- # clojurescript (188)
- # core-async (4)
- # css (2)
- # cursive (7)
- # data-science (5)
- # datomic (14)
- # emacs (1)
- # figwheel-main (192)
- # fulcro (37)
- # jobs-discuss (1)
- # mount (4)
- # off-topic (47)
- # pedestal (7)
- # portkey (14)
- # re-frame (4)
- # reagent (22)
- # reitit (2)
- # remote-jobs (1)
- # ring (6)
- # shadow-cljs (65)
- # spacemacs (7)
- # specter (6)
- # yada (8)
my current project uses single semicolons for comments and when ever i touch a file with one this happens: before:
; happy comment
(some code)
after":
; happy comment
(some code)
any ideas on how i can get it to stop doing this indentation? i cant think of any reason why this would be helpfulHeh, there's been some debate about it. The Lisp standard for line comments is double-semicolon, and that's what emacs goes with. Single-semicolon comments are indented on the assumption that they're not line comments.
Cursive indents single-semicolon at the beginning of the line as line comments, so mixed-IDE teams can have conflict about it.
Since Bozhidar was unwilling to change it on our side, Colin was kind enough to add an option in Cursive which would follow the Lisp/CIDER indentation. Not sure if that's in the latest stable Cursive version yet, but it's in the unstable.
thanks a ton egg. So this is something clojure mode is doing? is it possible to change the defaults to that it treats single semis the same way it treats doubles?
I forget where exactly that lives, whether it's clj mode or cider (or one of the subsidiary packages). I remember it came down to @bozhidar, so it's one of the packages he manages. When I was in this situation (mixed-IDE team) I looked briefly into changing it, and it looked like changing it would be harder than convincing my team to switch to the double-semicolon standard 😆 There's definitely a good argument that double-semicolon line comments are the correct choice, which makes a decent starting point if you want to try to get the other folks on the project to switch.
good to know. hmmm