Skip to main content
The Kotlin extractor maps tree-sitter Kotlin CST nodes to canonical concepts. The Kotlin grammar declares no field names at all, so every name is recovered from the first identifier-like child: class names from type_identifier, function and variable names from simple_identifier.

Detected concepts

Example

Renaming a function:
old.kt
new.kt
Running differens old.kt new.kt:

Example: change the body

Keep the declaration name and change what it does:
The report groups the value edit under its containing declaration. Use --format=json to inspect the underlying action and context, or --format=llm for a compact report with source locations.

Known limitations

  • The grammar’s missing field names mean label recovery is positional: a declaration with two identifier children can mislabel in exotic syntax.
  • Extension functions report as functions; the receiver type is part of the structure, not the name.