remember

A composable overload for EditorConfiguration.Companion.remember that uses EditorConfigurationBuilder to create and remember an EditorConfiguration instance. Check the documentation of overloaded EditorConfiguration.Companion.remember function below for more details. Note that builder lambda runs only once, therefore you should not have builder property reassignments based on conditions:

EditorConfiguration.remember {
// WRONG! onCreate will not be updated.
onCreate = if (condition) {
{ ... }
} else {
{ ... }
}
EditorConfiguration.remember {
// CORRECT! onCreate will use the updated logic based on the condition.
onCreate = {
if (condition) {
...
} else {
...
}
}

Return

an object that is used to configure the editor.

Parameters

builder

the builder block that configures the EditorConfiguration.


A composable function that creates and remembers an EditorConfiguration instance. Check the documentation of overloaded EditorConfiguration.Companion.remember function below for more details. Note that both builderFactory and builder lambdas run only once, therefore you should not have builder property reassignments based on conditions:

EditorConfiguration.remember(::EditorConfigurationBuilder) {
// WRONG! onCreate will not be updated.
onCreate = if (condition) {
{ ... }
} else {
{ ... }
}
EditorConfiguration.remember(::EditorConfigurationBuilder) {
// CORRECT! onCreate will use the updated logic based on the condition.
onCreate = {
if (condition) {
...
} else {
...
}
}

Return

an object that is used to configure the editor.

Parameters

builderFactory

the factory that should be used to construct EditorConfiguration.

builder

the builder block that configures the EditorConfiguration.