Created
July 1, 2021 07:03
-
-
Save quat1024/b8832078e916eb6462f968fbaa1a43d1 to your computer and use it in GitHub Desktop.
All my custom intellij live templates as of right now
This file contains hidden or 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
<template name="fofg" value="fieldOf("$FIELD$").forGetter(x -> $END$)" description=".fieldOf().forGetter()" toReformat="false" toShortenFQNames="true"> | |
<variable name="FIELD" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="COMPLETION" value="false" /> | |
<option name="JAVA_CODE" value="true" /> | |
<option name="JAVA_COMMENT" value="false" /> | |
<option name="JAVA_CONSUMER" value="false" /> | |
<option name="JAVA_DECLARATION" value="false" /> | |
<option name="JAVA_EXPRESSION" value="false" /> | |
<option name="JAVA_STATEMENT" value="false" /> | |
<option name="JAVA_STRING" value="false" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="lower" value="toLowerCase(Locale.ROOT)" description=".toLowerCase(Locale.ROOT)" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="COMPLETION" value="false" /> | |
<option name="JAVA_CODE" value="true" /> | |
<option name="JAVA_COMMENT" value="false" /> | |
<option name="JAVA_STRING" value="false" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="newregkey" value="public static final RegistryKey<Registry<$TYPE$>> KEY = RegistryKey.ofRegistry(Init.id("$NAME$")); public static final Registry<$TYPE$> REGISTRY = new SimpleRegistry<>(KEY, Lifecycle.stable());" description="Create a registry and registry key" toReformat="false" toShortenFQNames="true"> | |
<variable name="TYPE" expression="className()" defaultValue="" alwaysStopAt="true" /> | |
<variable name="NAME" expression="lowercaseAndDash(className())" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="oninit" value="public static void onInitialize() { 	$END$ }" description="public static void onInitialize()" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="psfc" value="public static final Codec<$THIS$> CODEC = " description="public static final Codec<this> CODEC =" toReformat="false" toShortenFQNames="true"> | |
<variable name="THIS" expression="className()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="psfid" value="public static final Identifier " description="public static final Identifier" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="recordco" value="RecordCodecBuilder.create(i -> i.group( 	$END$ ).apply(i, $THIS$::new));" description="RecordCodecBuilder boilerplate" toReformat="false" toShortenFQNames="true"> | |
<variable name="THIS" expression="className()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="Reg" value="Registry" description="Registry" toReformat="false" toShortenFQNames="false"> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="JAVA_STATEMENT" value="true" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="Regr" value="Registry.register(Registry.$END$);" description="Registry.register(" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="JAVA_EXPRESSION" value="true" /> | |
<option name="JAVA_STATEMENT" value="true" /> | |
</context> | |
</template> |
This file contains hidden or 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
<template name="singleton" value="public static final $THIS$ INSTANCE = new $THIS$();" description="public static final $this$ INSTANCE = new $this$();" toReformat="false" toShortenFQNames="true"> | |
<variable name="THIS" expression="className()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_DECLARATION" value="true" /> | |
</context> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment