Fork me on GitHub
#cursive
<
2021-09-30
>
mokr08:09:55

Hi, is there anything I can do myself to help Cursive understand e.g. re-posh/reg-sub like it understands re-frame/reg-sub, so that they show up in the “Structure” tool window , works with “find usages” and can be navigated with CMD+click? Update: Languagees & Frameworks > Clojure > Symbol Resolution looks promising, but I just have to figure out how to add new Global/IDE entries as there is no +/add button… Update2: I get the impression that what I want is the “Resolve _ as” functionality from context menu, but that only works for macros, not functions it seems.

cfleming09:09:24

Resolve as… is definitely what you want, and it should work for functions as well. Let me know if that’s not the case.

mokr13:09:45

@U0567Q30W That is good news, but for some reason I get No context actions available at this location when I try to bring them up for re-posh/reg-sub in a namespace where I have required [re-posh.core :as re-posh] (latest IntelliJ and Cursive). Then I noticed that inside the re-posh.core ns itself I get that context menu, but what should I actually resolve it as to have it work like re-frame.core/reg-sub? Trying def and defn didn’t seem to work. Update: Got it working from inside re-posh.core ns. Had to drop the re-frame.core/ ns part when resolving as reg-sub

cfleming20:10:48

That’s really strange, I can’t see why you would need to do that. But I’m glad it’s working!

imre09:09:40

@mokr I grepped my settings and it appears ~/Library/Application Support/JetBrains/IdeaIC2021.2/options/ClojureResolveSettings.xml contains these

roklenarcic12:09:58

I have a leiningen project. When I run it with lein run it works normally. When I run it with IntelliJ run profile with Run with Leiningen enabled, I get:

Could not decrypt credentials from /Users/roklenarcic/.lein/credentials.clj.gpg
Cannot run program "gpg": error=2, No such file or directory
See `lein help gpg` for how to install gpg.
In console, typing gpg works as expected

roklenarcic12:09:09

Is there some sort of weird path issue with IntelliJ?

Jeff Evans14:09:43

what is your $PATH in the terminal when it works? for Lein, I think you can set custom environment variables in the tool window

roklenarcic12:10:05

I’ll try that

wilkerlucio13:09:12

since yesterday I start seeing cursive marking some things as unresolved, that doesn't make sense, this macro is already setup to use as let, if I refresh the project it goes back to normal, but at random times Cursive seems to be marking as unresolved in the way you can see in the screenshot

1
wilkerlucio13:09:26

nevermind, it was related to clj-kondo things, no cursive deal 👍