I noticed that extract-function doesn't seem to notice that, when extracting within a thread (->), there should be an additional parameter. Is this something that would be a useful addition? I'll put a video of a quick prototype in the thread.
ah I see, makes sense!
something I noticed from your repro, when I try I don't have the extract function code action
Pardon the indentation
Yeah I think so, a test for that would be good
I entered https://github.com/clojure-lsp/clojure-lsp/issues/2175. I volunteer to play around with it and see if I can make it work.
your help is welcome!
Oops, I just noticed your reply. Previous to my PR, extract-function was only available from inside a function. It looks like your example is using a top level snippet.
I modified this so extract-function is available anywhere something could be pulled into a let (maybe there's something better, but it seems to work for me?). That's all in this PR: https://github.com/clojure-lsp/clojure-lsp/pull/2196
One other thing - the above PR doesn't include extract-function for threading. There was enough code associated with it that I figured it'd be better to create a new PR