The formatter works surprisinly well for Fennel (a Clojure-inspired dialect for Lua), I like the output much better than fnlfmt.
The only issue I encountered is difference in macros, Fennel uses comma for unqoute: ,form is like ~form in Clojure meaning leading commas are significant. When formatter strips them it can break a macro.
Example:
(macro when-let-repro [binding & body]
(let [[binding-form expr] binding]
`(let [temp# ,expr]
(when temp#
(let [,binding-form temp#]
,(unpack body))))))
Leading comma gets stripped:
@@ -2,5 +2,5 @@
(let [[binding-form expr] binding]
`(let [temp# ,expr]
(when temp#
- (let [,binding-form temp#]
+ (let [binding-form temp#]
,(unpack body))))))
Unfortunately Fennel does not support metadata, so adding #_:standard-clj/ignore causes compile error.
The formatter works surprisinly well for Fennel (a Clojure-inspired dialect for Lua), I like the output much better than
fnlfmt.The only issue I encountered is difference in macros, Fennel uses comma for unqoute:
,formis like~formin Clojure meaning leading commas are significant. When formatter strips them it can break a macro.Example:
Leading comma gets stripped:
Unfortunately Fennel does not support metadata, so adding
#_:standard-clj/ignorecauses compile error.