Fork me on GitHub
#cursive
<
2021-01-21
>
Jordan Robinson17:01:08

hey there, at the minute in cursive when I try and use httpkit.client I get a warning that it can't resolve the functions. I had a quick look into it and it looks like it might be because httpkit uses a macro to generate the functions under client. Is it expected that cursive wouldn't figure them out? It's a minor annoyance but it would be nice to have autocomplete on these if possible. This is the bit of httpkit with the macros: https://github.com/http-kit/http-kit/blob/master/src/org/httpkit/client.clj#L297 and please see attached image for what cursive says about it

markaddleman17:01:13

I just ran into this yesterday. I resolved by instructing cursive to resolve defreq as declare

Jordan Robinson17:01:47

ah that would be good! Could I ask where I would instruct cursive to do so?

markaddleman17:01:56

Not a perfect solution but it keeps cursive from generating warnings

markaddleman17:01:13

Sure. Go to defreq macro definition. Put the cursor on defreq and do an alt-enter

markaddleman17:01:29

You'll get a popup menu with an option for "Resolve defreq as..."

markaddleman17:01:38

Select "Specify"

markaddleman17:01:43

and choose declare from the next menu

markaddleman17:01:28

I'm giving these instructions from memory. If they aren't right, lmk

Jordan Robinson17:01:18

that did it, thanks very much! 🙂

👍 3