Files
openidea/languages/kotlin.toml
l0ng-ai 1122d67f7d fix(lsp): Deliver server settings and start servers on a supported JDK
- workspace/configuration answers a server's own section (basedpyright)
  from its settings block; basedpyright runs in "standard" mode and keeps
  auto search paths on, so `src/` layouts resolve from `tests/`.
- jdtls: formatting follows the editor indent, calls complete without
  guessed arguments, and JDK internals stay out of completion.
- `max-java` in a language server config picks an installed JDK no newer
  than that (kotlin-language-server fails on JDK 25).
- Server initialization may take up to 5 minutes (first Gradle import).
- `lsp_resend_diagnostics` re-emits stored diagnostics after a reload.
- Spelling only checks declared names (not called methods like
  `substring`) and accepts plurals of known software terms.
2026-10-28 08:28:00 +08:00

31 lines
1.1 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"
[[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"