lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
ericdallo 2021-04-27T20:51:24.151800Z

: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

2113🚀6🎉
anonimitoraf 2021-04-28T10:43:18.154900Z

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?

borkdude 2021-04-28T10:44:00.155200Z

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

anonimitoraf 2021-04-28T10:44:37.155400Z

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]]))

borkdude 2021-04-28T10:47:37.155700Z

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

borkdude 2021-04-28T10:47:43.155900Z

and then that also should work

borkdude 2021-04-28T10:48:11.156100Z

event handlers I mean

anonimitoraf 2021-04-28T10:48:34.156600Z

Oh, do you mean https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md?

anonimitoraf 2021-04-28T10:48:41.156900Z

Sweet. Thanks, I'll have a read through

borkdude 2021-04-28T10:48:42.157100Z

:thumbsup:

ericdallo 2021-04-28T11:25:34.157400Z

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

borkdude 2021-04-28T11:29:41.157600Z

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

ericdallo 2021-04-28T11:30:09.157800Z

Exactly :)

anonimitoraf 2021-04-28T11:35:18.158Z

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

borkdude 2021-04-27T20:56:30.152400Z

\cc @mikethompson :)

borkdude 2021-04-27T20:57:16.152600Z

> 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?

ericdallo 2021-04-27T20:57:53.153Z

yeah, looks way better!