ExperimentalHighlightApi

@RequiresOptIn(message = "This API is part of the experimental compose-highlight surface and may change or be removed in future releases without a deprecation cycle.", level = RequiresOptIn.Level.ERROR)
annotation class ExperimentalHighlightApi

Marks an API as experimental within the compose-highlight library.

Experimental APIs may change signature, behavior, or be removed in any future release without a deprecation cycle. They are provided for early feedback and are not yet considered stable for production use.

To use an API annotated with @ExperimentalHighlightApi, opt in at the call site:

// Opt in for a single composable or function:
@OptIn(ExperimentalHighlightApi::class)
@Composable
fun MyScreen() {
SyntaxHighlightedTextEditor(...)
}

Or propagate the requirement to your own API:

@ExperimentalHighlightApi
@Composable
fun MyEditorScreen() {
SyntaxHighlightedTextEditor(...)
}

To opt in for an entire file, add this to the top of the file (before the package statement):

@file:OptIn(ExperimentalHighlightApi::class)