cursive icon indicating copy to clipboard operation
cursive copied to clipboard

>defn and >defn- from guardrails are not recognized as definitions

Open Wegi opened this issue 4 years ago • 2 comments

Cursive already supports ghostwheel.core/>defn and ghostwheel.core/>defn- to be treated like the equivalent definitions.

But ghostweel is not maintained anymore. Guardrails are the contemporary library and work as a drop-in replacement. Please add support for com.fulcrologic.guardrails.core/>defn and com.fulcrologic.guardrails.core/>defn- to be treated as normal fn definitions.

Currently most of my functions are not recognized as having a definition because of this.

Wegi avatar Jan 21 '22 13:01 Wegi

First (I assume, you already did that, but for completeness)

You can open the context action menu on any symbol. (Alt/Option+Enter) And select "Resolve XXX as..."

image

Here you can select either defn or "Specify" and then select the best matching symbol: image

In the past, this didn't work for me, because Cursive saves this setting without a namespace. Check the .idea/ClojureProjectResolveSettings.xml and make sure, that the entry has the correct namespaces like:

<item key="com.fulcrologic.guardrails.core/&gt;defn" resolves-as="clojure.core/defn" />

MrEbbinghaus avatar Jan 21 '22 17:01 MrEbbinghaus

The manual entry helped. Thanks!

Wegi avatar Jan 24 '22 08:01 Wegi