All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlinx.jupyter.config.NotebookMetadata.kt Maven / Gradle / Ivy

Go to download

Implementation of REPL compiler and preprocessor for Jupyter dialect of Kotlin (IDE-compatible)

There is a newer version: 0.12.0-290
Show newest version
package org.jetbrains.kotlinx.jupyter.config

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
class LanguageInfo(
    val name: String,
    val version: String,
    val mimetype: String,

    @SerialName("file_extension")
    val fileExtension: String,

    @SerialName("pygments_lexer")
    val pygmentsLexer: String,

    @SerialName("codemirror_mode")
    val codemirrorMode: String,

    @SerialName("nbconvert_exporter")
    val nbConvertExporter: String,
)

val notebookLanguageInfo: LanguageInfo by lazy {
    LanguageInfo(
        "kotlin",
        currentKotlinVersion,
        "text/x-kotlin",
        ".kt",
        "kotlin",
        "text/x-kotlin",
        "",
    )
}

@Serializable
class KotlinKernelSpec(
    @SerialName("display_name")
    val displayName: String,
    val language: String,
    val name: String,
)

val notebookKernelSpec: KotlinKernelSpec by lazy {
    KotlinKernelSpec(
        "Kotlin",
        "kotlin",
        "kotlin",
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy