greglook / cljstyle

A tool for formatting Clojure code
Eclipse Public License 1.0
293 stars 39 forks source link

Support for heading and top-level comments #76

Open bitti opened 3 years ago

bitti commented 3 years ago

The comment formatting which was introduced in https://github.com/greglook/cljstyle/issues/30 distinguishes between inline and so called "leading comments". However Lisp (and Clojure) uses comment conventions which are using even more semicolons, i.e. Heading and Top-Level comments which are using four and three ; respectively (see https://guide.clojure.style/#four-semicolons-for-heading-comments and https://guide.clojure.style/#three-semicolons-for-top-level-comments). These comments shouldn't be reformatted with two semicolons. So we either need a way to detect these different comment types and provide separate prefix rules for them (i.e. Top-Level comments are usually followed by an empty line) or allow more flexible ways to specify the prefix rules for "leading comments".

eggsyntax commented 1 year ago

Strongly seconded -- being unable to follow Clojure section commenting standards is really unfortunate.