title: Intellij IDEA cannot resolve symbol on implicits (scala tagless final)
body: <p>I have some code using <em>tagless final</em> approach and found that Intellij IDEA couldn't recognize method from implicit class.</p>
  <p>I have some type-classes here (<code>Functor</code>, <code>Apply</code>, <code>Applicative</code> etc.) and one <code>implicit class FunctorOps</code> with some helper methods for <code>Functor</code>. This code compiles but IDEA couldn't found <code>void</code> and <code>implicit Applicative</code>. Look at the errors:</p>
  <blockquote>
  <p>Cannot resolve symbol void:44</p>
  </blockquote>
  <blockquote>
  <p>No implicit arguments of type: Applicative[F_]:51</p>
  </blockquote>
  <p>The code looks not too difficult:</p>
  <pre><code>trait Functor[F[_]] {
    def map[A, B](fa: F[A])(ab: A =&gt; B): F[B]
  }
  
  trait Semigroupal[F[_]] {
    def product[A, B](fa: F[A], fb: F[B]): F[(A, B)]
  }
  
  trait Apply[F[_]] extends Semigroupal[F] with Functor[F] {
    def map2[A, B, Result](fa: F[A], fb: F[B])(abr: (A, B) =&gt; Result): F[Result] =
      map(product(fa, fb))(abr.tupled)
  }
  
  trait Applicative[F[_]] extends Apply[F] {
    def pure[A](a: A): F[A]
  }
  
  object Implicits {
  
    final implicit class FunctorOps[F[_]: Functor, A](private val fa: F[A]) {
      @inline def map[B](ab: A =&gt; B): F[B] =
        F.map(fa)(ab)
  
      @inline def void: F[Unit] =
        F.map(fa)(_ =&gt; ())
    }
  }
  
  trait Random[F[_]] {
    def nextInt(n: Int): F[Int]
  
    def void: F[Unit]
  }
  
  object Random {
    import Implicits.FunctorOps
  
    def dsl[F[_]: Applicative]: Random[F] =
      new Random[F] {
        override def nextInt(n: Int): F[Int] = F.pure(scala.util.Random.nextInt(n))
  
        override def void: F[Unit] = nextInt(4).void
      }
  }
  
  object Foo {
  
    def dsl[F[_]: Applicative]: F[Unit] =
      Random.dsl.void
  }
  </code></pre>
  <p><strong>My question:</strong> is there any way to avoid this errors in IDEA or it is better to use for example <em>VS Code</em> with <em>Metals</em> or something else? Is there somethign works better with <em>tagless final</em>?</p>
  <p>I use std lib and add compiler plugin in sbt for using <code>F</code> dot method syntax:</p>
  <p><code>addCompilerPlugin(&quot;org.augustjune&quot; %% &quot;context-applied&quot; % &quot;0.1.4&quot;)</code></p>
  <p><a href="https://scastie.scala-lang.org/NZc3zBTISjWvoB5HNoUdPA" rel="nofollow noreferrer">Code with build parameters in scastie</a></p>
  <p>screenshots:</p>
  <p><a href="https://i.stack.imgur.com/xjyu9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xjyu9.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/fL6Lb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fL6Lb.png" alt="enter image description here" /></a></p>
  <p>My environment:</p>
  <ul>
  <li><p><strong>Intellij IDEA</strong> version <strong>2020.2.3</strong> (with last stable <strong>scala plugin</strong>)</p>
  </li>
  <li><p>OS: MacOS Catalina <strong>10.15.7</strong></p>
  </li>
  </ul>