Created
October 4, 2017 19:29
-
-
Save zeromancer/a2a5e37f9ba98fa6d1354db7b0f1f943 to your computer and use it in GitHub Desktop.
Intellij settings/templates/scala.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<templateSet group="scala"> | |
<template name="T" value="<$TAG$>$SELECTION$</$TAGNAME$> " description="Surround with <tag></tag>" toReformat="true" toShortenFQNames="true"> | |
<variable name="TAG" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="TAGNAME" expression="firstWord(TAG)" defaultValue="""" alwaysStopAt="false" /> | |
<context /> | |
</template> | |
<template name="logger" value="val log: Logger = Logger[$CLASS_NAME$]" description="Template to import Logger" toReformat="false" toShortenFQNames="true"> | |
<variable name="CLASS_NAME" expression="fileName()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="SCALA_CODE" value="true" /> | |
</context> | |
</template> | |
<template name="info" value="log.info("$EXPR_COPY$ = {}", $EXPR$)" description="log.info" toReformat="false" toShortenFQNames="true"> | |
<variable name="EXPR" expression="scalaVariableOfType("")" defaultValue="false" alwaysStopAt="true" /> | |
<variable name="EXPR_COPY" expression="EXPR" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="SCALA_CODE" value="true" /> | |
</context> | |
</template> | |
<template name="debug" value="log.debug("$EXPR_COPY$ = {}", $EXPR$)" description="log.debug" toReformat="false" toShortenFQNames="true"> | |
<variable name="EXPR" expression="scalaVariableOfType("")" defaultValue="false" alwaysStopAt="true" /> | |
<variable name="EXPR_COPY" expression="EXPR" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="SCALA_CODE" value="true" /> | |
</context> | |
</template> | |
<template name="logger2" value="val log: Logger = LoggerFactory.getLogger(this.getClass)" description="Template to import Logger" toReformat="false" toShortenFQNames="true" deactivated="true"> | |
<context> | |
<option name="SCALA_CODE" value="true" /> | |
</context> | |
</template> | |
<template name="privi" value="println(s"$EXPR_COPY$ = $$$EXPR$")" description="Template for println unwrapped" toReformat="true" toShortenFQNames="true"> | |
<variable name="EXPR" expression="scalaVariableOfType("")" defaultValue="false" alwaysStopAt="true" /> | |
<variable name="EXPR_COPY" expression="EXPR" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="SCALA_CODE" value="true" /> | |
</context> | |
</template> | |
<template name="intenum" value="sealed abstract class Stuff(val value: Int) extends IntEnumEntry object Stuff extends IntEnum[Stuff] { case object Entry1 extends Stuff(-1000) val values: IndexedSeq[Stuff] = findValues }" description="Template for enumeratum enum" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="SCALA_CODE" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment