My thoughts exactly too
Showing the new keyword analysis support in clojure-lsp towards the end in this video.
Really good keyword analysis overview, thanks! 😄
@ericdallo Hmm, I have an issue though, it doesn't find the keyword :citation
in two different files, even not after I have visited them both
I think this is expected, since it's a simple keyword, not namespaced. so clojure-lsp cannot know that one keyword is related to other (and probably is not)
eeeeeh
I disagree here. It should find all my usages of :citation
That's the entire point of using this over grep
yup, it should find all references
keywords are effectively global symbols
We could do that, I just thought that was expected when implementing it 😅
@snoe should it consider the :keys-destructuring
too?
yeah if you have :x (let [{:keys [x]} a] x)
it should find two usages if you search from col0 (searching for references from the destructured x, should find the local and not the keyword (same logic as rename)
and related, I'm pretty sure the pre-kondo version would not allow you to rename simple keywords.
Thanks for considering this @ericdallo and @snoe! I had to go for dinner
https://github.com/clojure-lsp/clojure-lsp/commit/6966bd25f7d823aa06ab36c795aeb7fe30db911c @borkdude ! it should be available on next release 🙂 Also we don't allow rename simple keywords now with that @snoe
Very good! Only finding them is good enough for me to be able to rename
yeah rename is just pretty scary if you start cascading to locals.
some people will be surprised with either choice you make i believe.