Fork me on GitHub

Hi, does anyone know if the keyword navigation changed in one of the latest versions? I used to be able to find usages of my re-frame subscriptions and events (namespaced keywords), by CMD-clicking or using OPT-F7 (“Find usages”). In the latest version it seems to interpret the namespace of the keyword literally so that “Find usages” only searches that namespace in addition to the current file. Example: namespace x.y have (reg-sub :foo/bar …) previously I would be able to find all places this subscription was used, but now it will only show me usages in ns “x.y” or “foo”. Is the old behaviour available behind some setting, perhaps? PS: I actually started using namespace keywords when I found that it allowed that kind of navigation while regular keywords didn’t. (Specs: IntelliJ 2020.2 CE, Cursive 1.9.3-2020.2, MacOS 10.15.6) EDIT: Maybe I got confused by a change in the popup or something. “Find usages” now asks which of the two namespaces I would like to search, but the selection does not seem to have any effect, as it search all anyway. What I’m hoping for is to see usages directly in that popup as that gives a much smoother experience than going via a listing in the “3:Find” panel.


That sounds very strange. Can you post a screenshot of the find usages panel with the results of a problematic search?


In particular I’m interested in the summary that says “Usages of <something> in <some scope>” - what does <some scope> look like?


Hey @cfleming, has anyone ever requested a feature to highlight unneeded type hints? I find the missing type hint highlighting quite useful


Yes, I’ve thought about this, as well as related things like moving multiple type hints from usages to the declaration (e.g. if a parameter has type hints on 3 of its usages, you could remove them all and type hint the parameter itself).


But it’s surprisingly tricky. Here’s an example:

(let [x ^List some-thing
      y x]
  (.iterator y))


Here the type hint on x is required because later it’s used after being implicitly passed to y. However if y never used interop forms, that would not be required.


I haven’t sat down to think through all the corner cases, but I suspect it’s a long list 🙂


I'm sure about that, thanks for the insight


You know the feature where you type something like (rf/dispatch ...), but you have no rf alias in your :require , and Cursive automatically adds or suggests it for you? I'm having a problem where it doesn't work for one namespace aliasing: [lambdaisland.glogi :as log]. Any ideas?


No, I can’t see why that wouldn’t work - I just tried to repro and it works fine here.


Can you create a small reproduction project and put it on github so I can try it?


@cfleming Sure, here it is: (for me :require assist does not work in db.cljs), it just looks like this: