tolitius / mount

managing Clojure and ClojureScript app state since (reset)
Eclipse Public License 1.0
1.22k stars 88 forks source link

Defstate name cannot be resolved in intelliJ (cursive) #120

Open Siegrift opened 3 years ago

Siegrift commented 3 years ago

Hi,

I am having problems to https://github.com/tolitius/mount/issues/102 (which should be solved now). Any name defined using defstate cannot be resolved.

The project I am working on is open sourced here: https://github.com/district0x/name-bazaar

An example of state can be found here https://github.com/district0x/name-bazaar/blob/4e87b6c64de0f2ebe2876f4b3bd1096fc3faabf5/src/name_bazaar/server/emailer.cljs#L20

and here is how it looks in the IDE. cannot_be_resolved

Versions

tolitius commented 3 years ago

I unfortunately don't use Intellij for Clojure dev (am a vi user) but since this was fixed as part of #102 could it be a configuration / setting that may help (@cursive-ide)?

empperi commented 3 years ago

Tell Cursive to treat defstate as def and you are fine. See the attached gif. Please note that the wait time you see after selecting it as def is due to IntelliJ reindexing everything I had in the project. This needs to be done only once.

I suggest this issue is closed since it is not Mount specific plus there is a working solution for this.

cursive-defstate