rememberHighlightedString
fun rememberHighlightedString(code: String, language: Language, theme: SyntaxTheme): AnnotatedString
Composable wrapper around highlight that caches the parsed tree-sitter Tree across theme-only changes. The first stage is keyed on (code, language) and re-parses only when one of those changes; the second stage applies theme to the cached tree. Native memory of the dropped tree is reclaimed by the JVM Cleaner registered in ktreesitter's Parser/Tree init blocks (no explicit disposal API exists).