Live templates autocomplete code AND, if relevant, prompt users to fill out variable names before the completion is considered done.
We'll use VAR to represent things that should be filled out by the user and "$" to represent the cursor position when done.
For now we'll collect everything here because there probably aren't that many Kobweb concepts but we could break this up into multiple bugs if that's better.
Actual live template shortcut names are open for debate!
Frontend
csss/cssstyle = CssStyle
val VAR = CssStyle {
base { Modifier.$ }
}
csssb/cssstylebase = CssStyle.base
val VAR = CssStyle.base {
Modifier.$
}
page
@Page
@Composable
fun VAR() {
$
}
worker
val worker = rememberWorker {
VAR { output ->
$
}
}
initsilk
@InitSilk
fun VAR(ctx: InitSilkContext) {
$
}
initkobweb
@InitKobweb
fun VAR(ctx: InitKobwebContext) {
$
}
Backend
api
@Api
fun VAR(ctx: ApiContext) {
$
}
initapi
@InitApi
fun VAR(ctx: InitApiContext) {
$
}
objapistream
val VAR = object : ApiStream {
override suspend fun onTextReceived(ctx: TextReceivedContext) {
$
}
}
Live templates autocomplete code AND, if relevant, prompt users to fill out variable names before the completion is considered done.
We'll use VAR to represent things that should be filled out by the user and "$" to represent the cursor position when done.
For now we'll collect everything here because there probably aren't that many Kobweb concepts but we could break this up into multiple bugs if that's better.
Actual live template shortcut names are open for debate!
Frontend
csss/cssstyle = CssStyle
csssb/cssstylebase = CssStyle.base
page
worker
initsilk
initkobweb
Backend
api
initapi
objapistream
apistream