cljstyle icon indicating copy to clipboard operation
cljstyle copied to clipboard

Support for heading and top-level comments

Open bitti opened this issue 3 years ago • 1 comments

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".

bitti avatar Jul 07 '21 04:07 bitti

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

eggsyntax avatar Jul 19 '22 19:07 eggsyntax