Skip to content

Instantly share code, notes, and snippets.

@rodolfo42
Created April 30, 2018 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodolfo42/cb7d27205d767e9c8517ab58d359978d to your computer and use it in GitHub Desktop.
Save rodolfo42/cb7d27205d767e9c8517ab58d359978d to your computer and use it in GitHub Desktop.
Fix for "symbol cannot be resolved" for Cursive + Midje

Fix for 'symbol cannot be resolved' when using Cursive + midje

Midje checkers (e.g. n-of, has, match from matcher-combinators) cannot be resolved when using Cursive because they are declared using the defchecker macro.

To make Cursive able to resolve these references as valid symbols, follow these steps:

  1. Download the defchecker.xml file somewhere in your machine
  2. In Cursive (IntelliJ) Preferences pane, navigate to Languages & Frameworks > Clojure > Symbol Resolution
  3. Click the cog icon, select Import Scheme... and choose the file you downloaded.
  4. Click Apply. Note: all open projects will be refreshed and re-indexed, so go get a coffee ☕
<ClojureResolveScheme>
<item key="midje.checking.checkers.defining/defchecker" resolves-as="clojure.core/def" />
<currentScheme>IDE</currentScheme>
</ClojureResolveScheme>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment