Fork me on GitHub
#lsp
<
2021-04-27
>
ericdallo20:04:24

clojure-lsp Released 2021.04.27-20.17.45: • Significantly improve the performance of workspace symbol filtering/searching. https://github.com/anonimitoraf/clj-flx/commit/61b2081b65b7d3be14851bac03ea508147c90054. (Kudos @nicdaoraf) • Always sort refers when clean-ns. • Add support for installing with homebrew on Linux (Kudos @wdullaer). • Fix find definition going to declare - Fixes https://github.com/clojure-lsp/clojure-lsp/issues/340 • Remove common already known clojure macros from Resolve macro as code action. • Bump clj-kondo to 2021.04.24-20210426.144134-2 adding support for finding re-frame event definitions by keyword. 🎉 🚀 Fixes https://github.com/clojure-lsp/clojure-lsp/issues/411

🎉 18
🚀 10
clj-kondo 3
clojure-lsp 3
catjam 6
borkdude20:04:16

> adding support for finding re-frame.core vars by keyword I think this doesn't really cover the feature well. Perhaps: Adding support for finding re-frame registrations by keyword is a better way to put it?

ericdallo20:04:53

yeah, looks way better!

anonimitoraf10:04:18

Thanks for the new features, guys. Question: I'm using kee-frame which exposes re-frame-like functions like reg-event-fx etc. Is there a way to allow jumping to their registrations the same way as re-frame registrations?

borkdude10:04:00

@nicdaoraf If those functions use the exact same syntax, then you can use :lint-as

anonimitoraf10:04:37

Ah, damn, theyre almost the same except kee-frame omits the event arg in the handler 😞

(rf/reg-event-fx
 ::a
 (fn [cofx [event arg]]))
vs
(k/reg-event-fx
 ::a
 (fn [cofx [arg]]))

borkdude10:04:37

@nicdaoraf you can write a hook to rewrite those events into re-frame events

borkdude10:04:43

and then that also should work

borkdude10:04:11

event handlers I mean

anonimitoraf10:04:41

Sweet. Thanks, I'll have a read through

ericdallo11:04:34

@nicdaoraf I think for this particular case the lint-as suggestion will work as expected :)

borkdude11:04:41

oh yes, I don't think clj-kondo really cares about the signature of the event function

anonimitoraf11:04:18

Oh, I see. I'll try it out later. Thanks! Works 🙂