Closed D00mch closed 1 year ago
Thanks for the PR. Know that I am looking at it and will provide feedback soon.
@D00mch, Thanks again for the PR. While reviewing I saw that the implementation was not handling docstrings and metadata maps yet (defstate
supports them, equal to a regular defn
). It also didn't account yet for the implicit this
parameter in the :stop
expression.
I took the liberty of giving a try myself. Instead of using the analyze-call
hook, I opted to use the macroexpand
hook. I find it easier to work with.
Can you try your this version in your editor? (nice animations by the way!)
Yes, it work great, and macroexpand is a better fit
Thanks for testing! It is released as 2.3.0.
Lib users will have hooks copied into their local .clj-kondo folder:
Demo (
defstate
behaves likedefonce
, :start is required):Clj-kondo lib's hooks examples: https://github.com/clj-kondo/clj-kondo/discussions/1528