How can I configure IDEA to automatically replace => with ⇒ and -> with →?

Scalariform will do this for you (if appropriately configured). I would imagine that what you want is something that can auto-expand those sequences into the relevant unicode characters though as you type. I honestly don't know whether or not this is possible in IDEA.


Take a look at this question and answer which makes use of IntelliJ's "Live Templates", in this case scalaz mappings in XML form saved as a file rather than entered from the GUI. This, I guess, is fine with scalaz as all the unicode aliased functions and methods are already present.


With IntelliJ 2016.1.4, which I am using, things has become easier.

File -> (Other Settings-> Default Settings) |Settings -> Editor -> Code Style -> Scala

Select tab Other

  1. select option Replace => with unicode symbol
  2. select option Replace -> with unicode symbol

However if one wants to support other unicode characters as in scalaz, then maybe, Live Template might still be the way to go. I haven't verified it.

With IntelliJ 2019.x.x, I recommend using Font Ligature along with Jetbrains Font like Jetbrains Mono especially when the use of unicode arrows are getting deprecated in Scala 2.13+. Besides, I found that the unicode symbol don't gel with Scala Repl.