Last active
March 2, 2025 18:46
-
-
Save ilyasipek/4506cfff91530340412ca01747da8382 to your computer and use it in GitHub Desktop.
a collection of compose live-templates
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="col" value="androidx.compose.foundation.layout.Column($MODIFIER$) { $END$ }" description="Creates a Column" toReformat="true" toShortenFQNames="true"> | |
<variable name="MODIFIER" expression="completeSmart()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="rmfs" value="androidx.compose.runtime.remember { androidx.compose.runtime.mutableFloatStateOf($INITIAL_VALUE$) } $END$" description="remembers a mutable float state" toReformat="true" toShortenFQNames="true"> | |
<variable name="INITIAL_VALUE" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> | |
<template name="row" value="androidx.compose.foundation.layout.Row($MODIFIER$) { $END$ }" description="Creates a Row" toReformat="true" toShortenFQNames="true"> | |
<variable name="MODIFIER" expression="completeSmart()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="box" value="androidx.compose.foundation.layout.Box($MODIFIER$) { $END$ }" description="Creates a Box" toReformat="true" toShortenFQNames="true"> | |
<variable name="MODIFIER" expression="completeSmart()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="mc" value="androidx.compose.material3.MaterialTheme.colorScheme.$COLOR$" description="Material 3 color" toReformat="false" toShortenFQNames="true"> | |
<variable name="COLOR" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="mp" value="modifier: androidx.compose.ui.Modifier = androidx.compose.ui.Modifier," description="Modifier param with default modifier" toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="mv" value="modifier = androidx.compose.ui.Modifier.$MODIFIER$" description="modifier = Modifier." toReformat="false" toShortenFQNames="true"> | |
<variable name="MODIFIER" expression="complete()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN_EXPRESSION" value="true" /> | |
<option name="KOTLIN_OBJECT_DECLARATION" value="true" /> | |
<option name="KOTLIN_STATEMENT" value="true" /> | |
<option name="KOTLIN_TOPLEVEL" value="true" /> | |
</context> | |
</template> | |
<template name="rcv" value="verticalAlignment = androidx.compose.ui.Alignment.CenterVertically," description="verticalAlignment = Alignment.CenterVertically," toReformat="false" toShortenFQNames="true"> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> | |
<template name="slot" value="$NAME$: @androidx.compose.runtime.Composable () -> Unit," description="Creates a Composable lambda" toReformat="true" toShortenFQNames="true"> | |
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> | |
<template name="sr" value="androidx.compose.ui.res.stringResource(id = R.string.$RESOURCE_ID$)" description="String resouce" toReformat="false" toShortenFQNames="true"> | |
<variable name="RESOURCE_ID" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="le" value="androidx.compose.runtime.LaunchedEffect($PARAM1$) { $END$ }" description="LaunchEffect with one key" toReformat="true" toShortenFQNames="true"> | |
<variable name="PARAM1" expression="kotlinVariable()" defaultValue=""Unit"" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="le2" value="androidx.compose.runtime.LaunchedEffect($PARAM1$, $PARAM2$) { $END$ }" description="LaunchEffect with tow keys" toReformat="true" toShortenFQNames="true"> | |
<variable name="PARAM1" expression="kotlinVariable()" defaultValue=""key1"" alwaysStopAt="true" /> | |
<variable name="PARAM2" expression="kotlinVariable()" defaultValue=""key2"" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="cch" value=" horizontalAlignment = androidx.compose.ui.Alignment.CenterHorizontally" description="horizontalAlignment = Alignment.CenterHorizontally" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> | |
<template name="rmis" value="androidx.compose.runtime.remember { androidx.compose.runtime.mutableIntStateOf($INITIAL_VALUE$) } $END$" description="remembers a mutable integer state" toReformat="true" toShortenFQNames="true"> | |
<variable name="INITIAL_VALUE" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> | |
<template name="rms" value="androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf($INITIAL_VALUE$) } $END$" description="remembers a mutable integer state" toReformat="true" toShortenFQNames="true"> | |
<variable name="INITIAL_VALUE" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
</context> | |
</template> | |
<template name="pr" value="androidx.compose.ui.res.painterResource(id = R.drawable.$RESOURCE_ID$)" description="string resource" toReformat="false" toShortenFQNames="true"> | |
<variable name="RESOURCE_ID" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="txt" value="androidx.compose.material3.Text(text = $TEXT$)" description="Creates a m3 Text" toReformat="false" toShortenFQNames="true"> | |
<variable name="TEXT" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="scf" value="androidx.compose.material3.Scaffold { innerPadding -> $END$ }" description="Creates a m3 Scaffold" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="scfTopbar" value="androidx.compose.material3.Scaffold( topBar = { $TOP_BAR$ } ) { innerPadding -> $END$ }" description="Creates a m3 Scaffold with Top bar" toReformat="true" toShortenFQNames="true"> | |
<variable name="TOP_BAR" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="statehoisting" value="$VALUE_NAME$: $TYPE$, on$CAPETLIZED_VALUE_NAME$Change: ($TYPE$) -> Unit," description="" toReformat="false" toShortenFQNames="true"> | |
<variable name="VALUE_NAME" expression="" defaultValue=""value"" alwaysStopAt="true" /> | |
<variable name="TYPE" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="CAPETLIZED_VALUE_NAME" expression="capitalize(VALUE_NAME)" defaultValue="VALUE_NAME" alwaysStopAt="false" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="de" value="androidx.compose.runtime.DisposableEffect($KEY$) { $END$ onDispose { } }" description="DisposableEffect with one key" toReformat="true" toShortenFQNames="true"> | |
<variable name="KEY" expression="kotlinVariable()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="de2" value="androidx.compose.runtime.DisposableEffect($KEY1$, $KEY2$) { $END$ onDispose { } }" description="DisposableEffect with tow keys" toReformat="true" toShortenFQNames="true"> | |
<variable name="KEY1" expression="kotlinVariable()" defaultValue="" alwaysStopAt="true" /> | |
<variable name="KEY2" expression="kotlinVariable()" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="vlc" value="val context = androidx.compose.ui.platform.LocalContext.current" description="Local Context val" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="vld" value="val density = androidx.compose.ui.platform.LocalDensity.current" description="Local Context val" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="vcs" value="val coroutineScope = androidx.compose.runtime.rememberCoroutineScope() " description="rememberCoroutineScope val" toReformat="true" toShortenFQNames="true"> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="hspacer" value="androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.width($PADDING$))" description="horizontal spacer" toReformat="true" toShortenFQNames="true"> | |
<variable name="PADDING" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> | |
<template name="vspacer" value="androidx.compose.foundation.layout.Spacer(modifier = androidx.compose.ui.Modifier.height($PADDING$))" description="vertical spacer" toReformat="true" toShortenFQNames="true"> | |
<variable name="PADDING" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="KOTLIN" value="true" /> | |
<option name="KOTLIN_COMMENT" value="false" /> | |
</context> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment