
Lightweight, fast code editor offering syntax highlighting for 19+ languages, smart autocomplete, real-time error detection, auto-formatting, multi-tab file management, 19 themes, and keyboard shortcuts.
A Compose Multiplatform code-editor component for Kotlin. Embed a fast, configurable editor in your Android, iOS, desktop, JavaScript, or WebAssembly app.
Use Nemo Code Editor wherever your Compose app needs to display or edit source code:
Add Nemo Code Editor to commonMain in your Kotlin Multiplatform project:
commonMain.dependencies {
implementation("io.github.ma7moud3ly:nemo-editor:1.0.4")
}You can also find the published package on Klibs.
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import io.ma7moud3ly.nemo.NemoCodeEditor
import io.ma7moud3ly.nemo.model.Language
import io.ma7moud3ly.nemo.model.rememberCodeState
@Composable
fun KotlinEditor() {
val state = rememberCodeState(
code = """
fun main() {
println("Hello from Nemo")
}
""".trimIndent(),
language = Language.KOTLIN,
)
NemoCodeEditor(
state = state,
modifier = Modifier.fillMaxSize(),
)
}val settings = remember {
EditorSettings(
theme = EditorThemes.NEMO_DARK,
tabSize = 4,
showLineNumbers = true,
showIndentGuides = true,
enableAutocomplete = true,
)
}
NemoCodeEditor(
state = state,
settings = settings,
modifier = Modifier.fillMaxSize(),
)EditorSettings is reactive, so its theme, font, indentation, and read-only state can be changed while the editor is on screen. See the NemoCodeEditor API documentation for the full API and additional examples.
This repository also contains Nemo Editor, a complete cross-platform code-editor application built with this library. It is a practical reference for integrating the component with file browsing, tabs, find and replace, and platform file operations.
git clone https://github.com/Ma7moud3ly/nemo-editor.git
cd nemo-editor
# Desktop app
./gradlew :composeApp:run
# Android app
./gradlew :androidApp:installGmsDebug
# Web app
./gradlew :composeApp:wasmJsBrowserDevelopmentRunTo publish the library to your local Maven repository:
./gradlew :nemo-editor:publishToMavenLocalContributions are welcome. Please follow Kotlin coding conventions, include tests where appropriate, and update documentation for user-facing changes. Open an issue or pull request to get started.
Nemo Code Editor is available under the MIT License.
A Compose Multiplatform code-editor component for Kotlin. Embed a fast, configurable editor in your Android, iOS, desktop, JavaScript, or WebAssembly app.
Use Nemo Code Editor wherever your Compose app needs to display or edit source code:
Add Nemo Code Editor to commonMain in your Kotlin Multiplatform project:
commonMain.dependencies {
implementation("io.github.ma7moud3ly:nemo-editor:1.0.4")
}You can also find the published package on Klibs.
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import io.ma7moud3ly.nemo.NemoCodeEditor
import io.ma7moud3ly.nemo.model.Language
import io.ma7moud3ly.nemo.model.rememberCodeState
@Composable
fun KotlinEditor() {
val state = rememberCodeState(
code = """
fun main() {
println("Hello from Nemo")
}
""".trimIndent(),
language = Language.KOTLIN,
)
NemoCodeEditor(
state = state,
modifier = Modifier.fillMaxSize(),
)
}val settings = remember {
EditorSettings(
theme = EditorThemes.NEMO_DARK,
tabSize = 4,
showLineNumbers = true,
showIndentGuides = true,
enableAutocomplete = true,
)
}
NemoCodeEditor(
state = state,
settings = settings,
modifier = Modifier.fillMaxSize(),
)EditorSettings is reactive, so its theme, font, indentation, and read-only state can be changed while the editor is on screen. See the NemoCodeEditor API documentation for the full API and additional examples.
This repository also contains Nemo Editor, a complete cross-platform code-editor application built with this library. It is a practical reference for integrating the component with file browsing, tabs, find and replace, and platform file operations.
git clone https://github.com/Ma7moud3ly/nemo-editor.git
cd nemo-editor
# Desktop app
./gradlew :composeApp:run
# Android app
./gradlew :androidApp:installGmsDebug
# Web app
./gradlew :composeApp:wasmJsBrowserDevelopmentRunTo publish the library to your local Maven repository:
./gradlew :nemo-editor:publishToMavenLocalContributions are welcome. Please follow Kotlin coding conventions, include tests where appropriate, and update documentation for user-facing changes. Open an issue or pull request to get started.
Nemo Code Editor is available under the MIT License.