This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-21
Channels
- # announcements (1)
- # babashka (66)
- # beginners (37)
- # calva (3)
- # cljdoc (2)
- # clojure (14)
- # clojure-australia (6)
- # clojure-doc (4)
- # clojure-europe (22)
- # clojurescript (9)
- # datalevin (5)
- # datomic (4)
- # emacs (5)
- # events (1)
- # figwheel-main (6)
- # graalvm (41)
- # lsp (16)
- # luminus (1)
- # off-topic (2)
- # overtone (2)
- # re-frame (2)
- # reagent (8)
- # remote-jobs (1)
- # reveal (49)
- # shadow-cljs (9)
- # spacemacs (14)
- # tools-build (4)
- # tools-deps (16)
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.
maybe a code action when you are inside function arguments like Convert function arity to map
Feel free to create a issue, not a priority I'd say, there are other code actions I want to include it first
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: https://github.com/clojure-lsp/clojure-lsp/issues/646
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)
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: https://rust-analyzer.github.io/blog/2021/11/21/ides-and-macros.html
Oh yeah that's true haha. Thanks, @U04V15CAJ !