lsp

JR 2025-12-17T19:06:38.276249Z

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.

ericdallo 2026-01-04T13:38:04.227179Z

ah I see, makes sense!

ericdallo 2025-12-29T17:39:21.090839Z

something I noticed from your repro, when I try I don't have the extract function code action

JR 2025-12-17T19:07:12.574329Z

JR 2025-12-17T19:07:51.746089Z

Pardon the indentation

ericdallo 2025-12-17T19:09:58.903629Z

Yeah I think so, a test for that would be good

JR 2025-12-17T20:35:03.506549Z

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.

❤️ 1
ericdallo 2025-12-17T22:50:33.181589Z

your help is welcome!

JR 2026-01-02T23:00:08.097439Z

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.

JR 2026-01-02T23:03:16.427809Z

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

JR 2026-01-02T23:04:21.491259Z

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