Fork me on GitHub
Drew Verlee18:08:23

my current project uses single semicolons for comments and when ever i touch a file with one this happens: before:

; happy comment
(some code)
; 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 helpful


Heh, 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.

Drew Verlee18:08:49

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.

Drew Verlee19:08:58

good to know. hmmm