IntelliJ上的猫与种类投影插件

问题描述 投票:1回答:2

我在IntelliJ中探索Cats,但是尽管IntelliJ Scala插件用于Kind Projector插件的support,IntelliJ无法识别插件的类型lambda表示法(λ)。是否有启用此功能的技巧?在运行代码检查后,我没有看到Kind Projector列出,尽管Kind Projector检查选项可用并在首选项中启用。我的IntelliJ版本是2016.2.2和Scala插件版本2016.2.1。

intellij-idea scala-cats kind-projector
2个回答
1
投票

在撰写本文时,使用v2016.3.1 EAP,IDEA Scala插件不支持多态lambda。如果向下滚动到您所引用页面上的评论,您将看到有人要求提供该功能。


0
投票

是的,它很久以前就得到了支持! 你可能有多项目构建环境吗?然后你需要在proj.settings部分为每个子项目添加种类投影仪。可能是这样的:

val commonSettings = Seq(
    addCompilerPlugin("org.spire-math" %% "kind-projector" % Version.kindProjector)
)
project.in(file("mainRunner")).settings(commonSettings)
© www.soinside.com 2019 - 2024. All rights reserved.