Avoiding` "X cannot be resolved"

20 views
Skip to first unread message

Michael Robin

unread,
Aug 20, 2022, 6:43:18 PM8/20/22
to Cursive
Hello... There are two cases where I'm getting a lot of error squigglies that I'd like to see if I can get rid of:

(a) Def-defining macros
When I have a macro that ends up doing a def or defn -- is there a way to annotate the macro with meta-data so that it specifies an argument (or string interpolation that includes argument(s)) so that the linter knows that the macro will define a certain name?

(b) Backquotes 
This is an interesting case. `[foo] should really be treated like '[foo] (unless there's an un-quote in there somewhere), as the expression will not be evaluated. Now the backquote will force a namespace on the symbol, so it will become [my-ns/foo] - but because it's not in the context of evaluation, I'm not sure if there should be a warning here. (But if there should be one, ISTM that the error should be "my-ns/foo cannot be resolved", but it's simply "foo cannot be resolved".

thanks

Colin Fleming

unread,
Aug 24, 2022, 4:15:01 AM8/24/22
to Cursive Group
Hi Michael,

You can fix the def-defining macros by customising how Cursive handles them: https://cursive-ide.com/userguide/macros.html#customising-symbol-resolution

I'll look at the backquote case again too, it's been something that I've thought about but it's not clear what the best approach is.

Cheers,
Colin
--
You received this message because you are subscribed to the Google Groups "Cursive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cursive+u...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages