Fork me on GitHub

I did a refactor where I changed positional parameters to a map and I was wondering if lsp could do it for me, as in changing the function signature and call sites. My functions generally start positional and are changed to receiving a map after getting a couple of parameters. Not really sure if this is something more people do, or if it is a common pattern.


lsp could do it, but sounds too specific to me


maybe a code action when you are inside function arguments like Convert function arity to map


That would be cool


Feel free to create a issue, not a priority I'd say, there are other code actions I want to include it first


Sure, thanks.


Not meaning to hijack this thread but, @UKFSJSM38 which code actions are you prioritizing?


This one I always wanted to have, it seems someone thought the same:

👌 1

Another thing I tried do refactor was extracting an anonymous function that I was using as an argument to map but extract to function was extracting the whole map form. Is this expected or did I do something wrong?


it's a bug, I think we need to improve the use of extract-function on threads and non directly calls like (map my-func coll)


please open a issue

👍 1
Noah Bogart21:11:03

Here’s an interesting article about the trouble of handling macros in LSPs, focused on rust but seems like it could be interesting/apply to us as well:


Yeah, that's so true, I know him and he is a really good LSP-rust maintainer..


But I think most of the macro trouble was/is already solved on clj-kondo


Clj-kondo does a really good work handling and supporting macros :)

Noah Bogart00:11:47

Oh yeah that's true haha. Thanks, @U04V15CAJ !