Repository navigation
fix: point at the kotlin extension's first-run setup instead of a reload failure - #21
Merged
Merged
Conversation
…oad failure JetBrains.kotlin-server activates but registers none of its server commands until its region, terms and data-sharing prompts are answered, so every sync reported "Kotlin LSP did not reload". Detect that state from its intellij.region and intellij.dataSharing settings and the missing server commands, show one notice per window with a button to its setup page, and say the same when Debug with Elide would attach to its debugger. Signed-off-by: Sam Gammon <sam@elide.dev>
Sam Gammon (sgammon)
requested a review
from Dario Valdespino (darvld)
as a code owner
October 13, 2026 02:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The extension now detects when JetBrains' Kotlin extension is waiting on its first-run setup and says so. Previously every sync reported "Kotlin LSP did not reload".
Why
JetBrains.kotlin-server(0.0.13) activates normally but holds its language server back until a region and a data-sharing choice are recorded and its terms are accepted. Until then it never callsactivateExtension, sojetbrains.kotlin.reloadWorkspaceandjetbrains.kotlin.restartLspare never registered.reloadKotlinLsptreated the missing commands as a reload failure. The Kotlin extension's own gate (from its bundled sources,consent.tsandeula.ts) reads the user values ofintellij.regionandintellij.dataSharing, wherenot_set(the default) means unanswered.How
@elide/ide-core:unansweredKotlinSetupStepsandkotlinSetupPendingMessage(kotlinSetup.ts), with unit tests.jetbrains.ts:pendingKotlinSetup()reports the setup as pending when either:intellij.regionorintellij.dataSharingis unanswered, orjetbrains.showLicenseSetupis registered, and none of its server commands are. This covers the terms, which live in its private state.reloadKotlinLspthrowsKotlinSetupPendingErrorinstead of the generic error.jetbrains.showLicenseSetup, or opens the two settings if that command is missing. The language server importsworkspace.jsonitself when it starts after setup, so nothing else is needed.intellijadapter shows the same warning instead of starting an Elide process for a debugger that is not running.Verified
bun run build,bun run --filter elide typecheck,bun run test(144 pass).JetBrains.kotlin-server0.0.13, Elide 1.6.0-rc.2 and a fresh profile withoutintellij.region/intellij.dataSharing:Kotlin LSP not started: the Kotlin extension is waiting for its first-run setup (region, data sharing); …and one warning with "Open Kotlin Setup" appears, next to the Kotlin extension's own "initial setup is incomplete" notice.elide.synclogs the same line and shows no second warning.jetbrains.kotlin.reloadWorkspace.Closes #16