mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
A new Java scratch was an empty file that couldn't run until a class and main method were typed in. Languages can now define `scratch-template` in `languages/<id>.toml`; a new scratch gets that content with the caret at `$END$`. - Java, Kotlin, Go, Rust, C and C++ get a runnable `main`. - Other languages still start empty.
36 lines
1.2 KiB
TOML
36 lines
1.2 KiB
TOML
id = "kotlin"
|
|
name = "Kotlin"
|
|
extensions = ["kt", "kts"]
|
|
line-comment = "//"
|
|
block-comment = ["/*", "*/"]
|
|
indent = { tab-size = 4, insert-spaces = true }
|
|
ui-mode = "Kotlin"
|
|
tree-sitter = "kotlin"
|
|
scratch-template = '''
|
|
fun main() {
|
|
$END$
|
|
}
|
|
'''
|
|
|
|
[[language-servers]]
|
|
name = "kotlin-lsp"
|
|
command = "kotlin-lsp"
|
|
args = ["--stdio"]
|
|
root-markers = ["settings.gradle.kts", "settings.gradle", "build.gradle.kts", "build.gradle", "pom.xml"]
|
|
install-hint = "Install JetBrains Kotlin LSP: brew install JetBrains/utils/kotlin-lsp (https://github.com/Kotlin/kotlin-lsp)"
|
|
|
|
[[language-servers]]
|
|
name = "kotlin-language-server"
|
|
# Alternative: used only when the server above is not installed.
|
|
fallback = true
|
|
command = "kotlin-language-server"
|
|
# Its bundled Kotlin compiler can't parse newer JDK versions ("25.0.4.1").
|
|
max-java = 21
|
|
root-markers = ["settings.gradle.kts", "settings.gradle", "build.gradle.kts", "build.gradle", "pom.xml"]
|
|
install-hint = "brew install kotlin-language-server (https://github.com/fwcd/kotlin-language-server)"
|
|
|
|
[debugger]
|
|
adapter = "kotlin-debug-adapter"
|
|
command = "kotlin-debug-adapter"
|
|
install-hint = "Install https://github.com/fwcd/kotlin-debug-adapter and put `kotlin-debug-adapter` on PATH"
|