Файли
openidea/languages/kotlin.toml
T
rohitkumardandaтаrohitdanda c5481e8fe4 fix(lsp): language servers that give up, start slowly or send bad data (#3449)
Several causes behind servers that ended up absent or stuck:
- Fallback servers now take over when the preferred one gives up (missing, not launchable, crashed for good, expired), not only when it is missing, and hand back after a manual restart.
- Crash-budget uptime counts from ready, not from launch; the crash message carries why initialize failed (timeout or the server's error).
- Restart works while a server is still starting and no longer holds the reconfigure lock while it waits; a server dropped during its crash backoff no longer comes back.
- Progress of a still-starting server is watched.
- One malformed diagnostic no longer drops the file's other problems; DocumentLink.target URIs are escaped.
- Semantic tokens, inlay hints and code lens are asked again on ContentModified (staleRequestSupport).
- rustup toolchain lookup uses the platform executable suffix and USERPROFILE, and probes in the project root with a timeout.
- Server output lines are capped at 8 KiB.
- Go to Declaration from Java to a Kotlin class declared in a differently named file finds the .kt source.
- The kotlin-lsp install hint names the Language Servers settings page.

Co-authored-by: rohitdanda <[email protected]>
2026-11-15 04:10:44 +08:00

45 рядки
1.7 KiB
TOML
Неформатований Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
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 in Settings › Languages & Frameworks › Language Servers (https://github.com/Kotlin/kotlin-lsp), or with Homebrew: brew install JetBrains/utils/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)"
[[language-servers]]
name = "kmp-lsp"
# Alternative: tree-sitter based, starts at once and needs no JVM or Gradle import, but resolves
# symbols syntactically. Used only when the servers above are not installed.
fallback = true
command = "kmp-lsp"
root-markers = ["settings.gradle.kts", "settings.gradle", "build.gradle.kts", "build.gradle", "pom.xml"]
install-hint = "Install kmp-lsp in Settings › Languages & Frameworks › Language Servers (https://github.com/Hessesian/kmp-lsp)"
[debugger]
adapter = "kotlin-debug-adapter"
command = "kotlin-debug-adapter"
install-hint = "Install Kotlin Debug Adapter in Settings › Languages & Frameworks › Language Servers"