Skip to content

Latest commit

 

History

History
425 lines (343 loc) · 96.9 KB

0018-editor-code-intelligence.md

File metadata and controls

425 lines (343 loc) · 96.9 KB

ADR 0018: The page's editor gets code intelligence from local language servers, behind a setting

Field Value
Status Accepted
Date 2026-11-03
Spec web-ui (the code_intelligence and autocomplete preferences, the session route and its security rules, the keyboard table, the bundle budget, testing), cli (the code intelligence rows and what --fix installs), installation-and-workspaces (.cs/lsp/), architecture
Amends ADR 0015 (the editor gains a language service; one WebSocket route, for language-server sessions only; its revisit trigger for a language-server bridge is closed), PRD (NFR-12: the whole-bundle budget leaves out the code-intelligence chunk, as it leaves out the Vim chunk)
Builds on ADR 0008, ADR 0010, ADR 0012, ADR 0013, ADR 0016

Context

The owner asked (2026-11-03) for language intelligence in the page's editor, as a setting each user turns on and off: hovering a symbol shows its documentation; errors are marked as you type, such as a call to a function that was never imported; and, when on, the editor behaves like IntelliJ IDEA, marking errors, type errors and other issues. A follow-up asked for Cmd-click (Ctrl-click on Linux) to go to a definition: within the file, into another workspace file opened in a tab, and into library or standard-library sources, with a keyboard equivalent and a defined behavior under Vim. Answering the draft's questions the same day, the owner made autocomplete a second setting, which can be turned on only while code intelligence is on.

What the code base shows:

  • The editor has no language service: web-ui says the page relies on the CLI's diagnostics. A run's diagnostic events reach the editor through tools/web-ui/src/page/run-session.ts (cleared at run_start, set for each open file), and Editor.setDiagnostics in tools/web-ui/src/editor.ts replaces the editor's whole lint set through @codemirror/lint's setDiagnostics.
  • basicSetup binds Cmd-click (macOS) and Ctrl-click (elsewhere) to adding a cursor, and gives every Alt-mousedown to rectangular selection (addsSelectionRange and rectangularSelection in @codemirror/view 6.43.15).
  • The editor already completes, without a server. basicSetup includes @codemirror/autocomplete 6.20.4, a 35.3 KB raw chunk of the committed bundle: Ctrl-Space (on macOS also Option- and Option-I) opens the list as you type, Escape closes it and Enter accepts. The language supports feed it: Python's adds the builtins (isinstance, memoryview) and the file's names, and TypeScript's adds snippets (function ${name}, for (let ${index}`) and the file's names. No spec mentions it.
  • The bundle has little room. Without the Vim chunk it is 944.3 KB raw of NFR-12's 1,024 KB and 339.5 KB gzip of its 350 KB, as cli/tests/entrypoints/web/test_bundle_budget.py counts the committed files.
  • ADR 0015 rejected WebSocket because every client action was an ordinary request, and named "a need the editor cannot meet, such as code completion from a language server" as the trigger for a language-server bridge. uvicorn runs without its standard extra, so it has no WebSocket implementation today.
  • The workspace already carries editor tooling: python/ lists pyright 1.1.414 as a dev dependency, configured by [tool.pyright] with typeCheckingMode = "standard"; typescript/ pins TypeScript ~6.0.3, the compiler that --typecheck runs; go.work and rust/Cargo.toml exist for gopls and rust-analyzer (IDE files). IDEs run language servers on this workspace today (ADR 0010).
  • Stubs throw (raise NotImplementedError, throw new Error("Not implemented"), panic("not implemented"), todo!(), TODO("Not implemented")), so a fresh stub has no missing-return error; its parameters are unused.

Spikes (scratch code and installs outside the repository and the workspace), on the maintainer's laptop (arm64 macOS, 18 GiB) at a load average of 4 to 6. Times count from didOpen unless stated; memory is the resident size of the server's process tree:

Spike Result
@codemirror/lsp-client 6.3.0 (MIT, 2026-09-17), bundled with esbuild 0.28.2, CodeMirror packages external Client, hover and definition: 50.7 KB raw, 16.1 KB gzip, of which marked is 37.6 KB. With marked replaced at build time by an escaping stand-in: 13.1 KB raw, 4.9 KB gzip. Every feature of the package: 65.4 KB raw, 20.7 KB gzip. The protocol types add nothing
@codemirror/lsp-client, read from its source serverDiagnostics() replaces the editor's whole lint set, so it would erase run diagnostics; hover renders Markdown with marked into innerHTML, filtered only by an optional sanitizeHTML; jumpToDefinition is bound to F12 only, takes the first location and crosses files through Workspace.displayFile; no pull diagnostics, although the capability is declared; requests from the server get MethodNotFound; processId is null; a reconnect sends didOpen again for every open file. Its serverCompletion and signatureHelp never send completionItem/resolve, and render completion and signature documentation with marked as hover does
Completion and signature help, with @codemirror/lsp-client 6.3.0's client capabilities Both servers declare resolveProvider, and no item of any list carries documentation or a detail. basedpyright: 23 items after heapq. in 0.652 s (the session's first request), 84 after "a b c". in 0.023 s, 211 when invoked on sorted in 0.077 s, each list marked incomplete. typescript-language-server: 40 items after ["a", "b"]. in 0.067 s and 45 after Math. in 0.016 s, complete lists. completionItem/resolve returns Markdown documentation in 3 to 13 ms; typescript-language-server adds the signature as detail, basedpyright puts it in the documentation's code block. Signature help inside heapq.heappush(heap, 3) and Math.max(1, 2): one signature, with its documentation, in 2 to 7 ms. Each server has a setting for completions that add an import: basedpyright's autoImportCompletions, and typescript-language-server's includeCompletionsForModuleExports, which it turns on by default
Python: the workspace's pyright 1.1.414 (its wheel bundles the server; run with the Node that TypeScript practice needs) Initialize 0.125 s, diagnostics 0.226 s, 151 MB. "sqrt" is not defined and "math" is not defined (reportUndefinedVariable), the type error (reportAssignmentType), unused names as hints tagged Unnecessary. Hover shows signatures without documentation for sorted, heapq.heappush, str.split and len
Python: basedpyright 1.40.2 (npm: 6.2 MB download, 42 MB installed, no dependencies) Initialize 0.176 s, diagnostics 0.285 s, 174 MB; the same diagnostics, with rule names on the unused ones; hover adds the documentation of sorted, heappush, str.split and len, from docstrings it scrapes from compiled builtins (basedpyright). Its PyPI wheel (13.7 MB) requires a 56 MB wheel holding a second Node
TypeScript: typescript-language-server 6.0.3 (0.5 MB download, no dependencies) over TypeScript 6.0.3's tsserver Initialize 0.063 s, diagnostics 0.994 s, 171 MB; TS2322, Cannot find name 'sqrt' (TS2304), and TS6133 tagged Unnecessary; hover with the JSDoc of the standard library; definitions into node_modules/typescript/lib/*.d.ts and @types/node
TypeScript: TypeScript 7.0.2's own tsc --lsp --stdio (a 24 MB native binary) 40 MB; diagnostics only on request (textDocument/diagnostic), the same three codes in 0.03 s; it ignored exit until killed
Go: gopls v0.24.0 (go install in 17.5 s; 43 MB binary) Initialize 0.199 s, diagnostics 0.442 s, 69 MB; undefined: strings, the type error, and the unused import and variable as errors tagged Unnecessary; hover with documentation; definitions into GOROOT. Hover adds web links to package documentation unless linksInHover is off, and links inside the documentation are file:// links into GOROOT. gopls v0.24.0 needs Go 1.27 to build, v0.23.0 Go 1.26, v0.21.1 Go 1.25
Rust: rust-analyzer of 2026-11-02 (14.3 MB download). The rustup proxy on PATH answers Unknown binary 'rust-analyzer' while the component is missing Hover and definitions into core/src/slice/mod.rs at once; no diagnostics for the unsaved file. After didSave, cargo check reports use of undeclared type HashMap (E0433, with the use line to add) and E0308 at 3.0 s, 200 MB. With the workspace's VS Code setting check.extraArgs: ["--keep-going"], cargo check fails (the argument '--keep-going' cannot be used multiple times), because rust-analyzer has passed the flag itself since July 2024 (#17561), so no cargo check diagnostic shows at all
Java: Eclipse JDT LS Run in phase 2: Phase 2 spikes
Kotlin: Kotlin LSP v263.7084.0 Run in phase 2, and failed: Phase 2 spikes; run again with the open-source servers once the owner accepted a license, and chosen: Kotlin revisited
The bridge: a Starlette 1.10.0 WebSocket on uvicorn 0.54.0 with wsproto 1.3.2 (pure Python, needs only h11; 192 KB installed), relaying pyright's standard streams In Playwright's Chromium, Firefox and WebKit, under the page's CSP (connect-src 'self'): no violation, the SameSite=Strict cookie on the handshake, initialize answered in 110 to 332 ms, first diagnostics 0.78 to 1.03 s after connecting, hover and definition answered. A page on another 127.0.0.1 port sent the cookie too, since cookies ignore ports (RFC 6265 §8.5), and only the Origin check refused it. pyright exited on its own when its standard input closed
Browser rules Chromium pools at most 6 HTTP/1.1 connections per host and, separately, 255 WebSockets (Firefox: 200), per net/socket/client_socket_pool_manager.cc. CSP Level 3 matches 'self' to a ws: URL on an http: page with the same host and port (§6.7.2.8)
A TypeScript language service in the browser TypeScript 6.0.3's typescript.js alone is 8.7 MiB raw, 1.6 MiB gzip

Decision

Owner answers

# Question Answer (2026-11-03)
O1 Completion and signature help: in scope? Yes, as a second setting, autocomplete, off by default and available only while code intelligence is on (Autocomplete). References, rename and quick fixes stay out of scope
O2 Java and Kotlin Java on JDK 25 or 26 only. Kotlin waits for a spike of its server. Their phase is set by O4
O3 Does autocomplete also govern the completion the editor offers without a server? Yes (amended the same day): with autocomplete off, or with code intelligence off, the editor offers no completion at all, "otherwise autocompletion is never truly off. We want the setting because it lets the user test their skills in different scenarios" (Autocomplete)
O4 In what order do the languages ship? Python and TypeScript first, then Java and Kotlin, then Go and Rust, each its own release (Phases). Kotlin starts from a spike of the alpha Kotlin LSP; if the spike fails, Java ships alone. This replaces the order of the first draft (Go and Rust, then Java, then Kotlin)
O5 Kotlin after its failed spike (2026-11-08) "do what we need to do with kotlin, users can accept the license, if there is an opensource version we can try it also": an open-source server if one serves the workspace's Kotlin, else JetBrains' Kotlin LSP behind a license each user accepts (Kotlin revisited)

The settings

  • code_intelligence, a preference, off by default. When it is on, a file whose language has an installed server gets live diagnostics, hover documentation and go to definition; any other file behaves as today. One switch serves every language. The Settings view lists each language's state: basedpyright 1.40.2, not installed: run cstudy doctor --fix, needs JDK 25 or 26, or not available yet.
  • Part of the editor, not a practice command. Like highlighting, code intelligence grades nothing, records nothing and writes no file, so it needs no command of its own; terminal users get the same through the IDEs of ADR 0010, which run language servers on the same workspace. What the CLI gains first is installing and checking the servers (Without a server).
  • autocomplete, a second preference, off by default. It governs all completion in the editor and signature help, and takes effect only while code_intelligence is on: off, the editor offers no completion at all; on, the server completes where it is ready and the editor's own completion stands in where it is not (Autocomplete).
  • "Like IntelliJ IDEA" in the first phases means: errors, warnings and type errors underlined as you type, with gutter markers and counts in the status bar; unused code faded and deprecated code struck through; documentation on hover, by mouse and by keyboard; go to definition by Cmd-click or Ctrl-click, F12 and Vim keys; and, with autocomplete on, completion and signature help. References, rename and quick fixes stay out of scope (Revisit).

Servers

One server per language, chosen for the documentation it shows, the diagnostics it gives on unsaved text, and an install that works offline afterwards:

Language Server Installed by Root Notes
Python basedpyright 1.40.2 cstudy doctor --fix, from npm into .cs/lsp/ python/, or the project folder Reads [tool.pyright], so it checks in the workspace's standard mode and resolves imports through python/.venv, as the workspace's pyright does; hover documents the standard library, which pyright does not
TypeScript typescript-language-server 6.0.3 The same typescript/, or the project folder Runs the tsserver of the workspace's own TypeScript (typescript/node_modules/typescript/lib), the compiler --typecheck runs; automatic type acquisition off
Go (phase 3) gopls, by the selected Go: v0.21.1 on 1.25, v0.23.0 on 1.26, v0.24.0 on 1.27 cstudy doctor --fix: go install with GOBIN=.cs/lsp/bin, GOTOOLCHAIN=local and GOWORK=off, online once, again only for a Go that pins another version go/, found through the root go.work, or the project folder, through its own go.work linksInHover off, and completeUnimported off, since completing a package that is not imported adds its import; runs with GOTOOLCHAIN=local, GOPROXY=off, GOFLAGS=-mod=readonly and CGO_ENABLED=0, as cstudy test builds Go
Rust (phase 3) rust-analyzer from rustup, or any rust-analyzer on PATH whose --version runs You: rustup component add rust-analyzer. cstudy doctor --fix never changes the Rust toolchain, as it never runs cargo rust/, or the project folder check.allTargets on and no --keep-going of ours; a target directory of its own (cargo.targetDir true: target/rust-analyzer/), so it never waits for an IDE's cargo check; the standard library read from links in .cs/lsp/rust-library/<root>/ (cargo.sysrootSrc), out of reach of the workspace's vendored crates.io; completion.autoimport.enable off; CARGO_NET_OFFLINE=true; its own diagnostics, such as syntax errors, are pulled as you type, and cargo check errors come once the workspace is loaded and after each save
Java (phase 2) Eclipse JDT LS 1.63.0, the milestone jdt-language-server-1.63.0-202610191322.tar.gz (51.1 MB), checked by SHA-256 cstudy doctor --fix, a download into .cs/lsp/jdtls/ (52 MB unpacked), whatever JDK is selected, so a JDK installed later needs no network jvm/, or the project folder Runs on the selected JDK only when it is 25 or 26, since cstudy never searches for another JDK (ADR 0016); heap capped at 1 GB (-Xmx1g, serial collector). The Gradle import runs offline over the warm-up; no Maven import; no build, so no class file lands in a project, and the open documents are checked as they change; the Eclipse files of each project stay out of its folder. A data directory per root and per session, under .cs/lsp/jdtls-data/<root>/<n>/, holds its configuration, index and caches; it starts with an empty list of Gradle versions, so its check of the root's Gradle wrapper downloads no checksum, and the settings trust the wrapper cstudy ships. Idle time 5 minutes, since a start imports the build again
Kotlin (after phase 3) JetBrains' newest Kotlin LSP build (263.7084.0 when measured), the standalone archive of each machine (360 MB, 1.1 GB unpacked, its own runtime), checked by the SHA-256 JetBrains publishes beside it cstudy doctor --fix, into .cs/lsp/kotlin-lsp/server/ with a record of its version and last day, only once you accept its license, which the workspace's marker records; then a warm-up on jvm/, online jvm/, or the project folder bin/intellij-server --stdio, --system-path in a data directory per root and session (.cs/lsp/kotlin-lsp-data/<root>/<n>/), and through IJ_JAVA_OPTIONS a 1 GB heap, the serial collector, a 240 MB code cache, its configuration, logs and plugins in that directory, no update check, and the selected JDK (21 to 26) for its Gradle import. Pull diagnostics, with refreshes as its import and index progress. Idle time 5 minutes (Kotlin revisited)
  • Pinned and tested. .cs/lsp/ is an npm project whose package.json and pnpm-lock.yaml, with exact versions and integrity hashes, ship with cstudy. cstudy doctor --fix installs it with pnpm install --frozen-lockfile --ignore-scripts, and the Node 24 that TypeScript practice needs runs both servers. A cstudy release moves the versions; supported means the slow tests pass with them.
  • Offline. Nothing is downloaded after cstudy doctor --fix, and no server reaches the network: tsserver's automatic type acquisition is off, gopls's web links are off, and cargo runs offline over the vendored crates.
  • Roots. A session's root is a practice project or a project folder, never the workspace root or .cs/, so the materialized references in .cs/build/ are never indexed, hovered or offered as a definition.
  • Hidden directories. Four places hold what a server must never show: the references in .cs/build/, the generated cases and their expected outputs in .cs/cases/, the data of the runs in .cs/runs/, and the content root, where the reference solutions are. A page document can still name them (import … from "../../.cs/build/…", a /// <reference path>, a tsconfig.json paths entry), and a server resolves such a path like any other. So a Node server starts with NODE_OPTIONS=--require=<hide_paths.cjs> and the four directories in CSTUDY_HIDDEN_DIRECTORIES: in the server and in every Node process it starts, tsserver included, opening, reading, listing, statting or resolving a path in them fails as a file that is not there does. The broker also leaves such locations out of definition answers and refuses them as library files. A server that is not a Node program (gopls, rust-analyzer, JDT LS, the Kotlin LSP) does not run the script: each phase that adds one must keep these directories from its server in its own way, and until then the broker's filtering is all there is (Hidden directories). The Kotlin LSP is kept from them as JDT LS is (Kotlin revisited). JDT LS (phase 2), gopls and rust-analyzer (phase 3) are kept from them by what they can reach. For JDT LS: Java names no file by its path, so a page document can reach a class only through the root's Gradle build, which never includes .cs/build/, .cs/cases/ or .cs/runs/ (the references build in .cs/build/jvm/, a build of its own); a user who edits the build to include them is past what a broker can stop. The broker's filtering stays, and a broker test checks a definition answer that names a Java reference in .cs/build/jvm/. gopls reaches a file only through a module of the root's go.work, whose replace lines name the runner runtime in .cs/runtime/, never .cs/build/; the slow gopls test shows a function of a reference in .cs/build/go/ as undefined in a practice file. rust-analyzer resolves #[path] and include! only inside the source roots of the root's Cargo workspace, which never include .cs/build/; cargo check compiles what a page document includes, as cargo test would, but the broker passes no diagnostic of a file outside the root. Broker tests leave a Go and a Rust reference in .cs/build/ out of a definition answer, and cargo check's diagnostics of one out of the page; a documentation link into a hidden directory stays its text.

Phase 2 spikes

Run on 2026-11-07, on the maintainer's laptop (arm64 macOS, 18 GiB, swap nearly full, another test run alongside), each server alone, with a client that speaks to the server's standard streams as the broker does, on a workspace from cstudy init warmed up by cstudy doctor --fix on Temurin 25.0.5. Times count from didOpen; memory is the peak resident size of the server's process tree, sampled every 0.5 s; network is every socket of the server and of any Gradle daemon it started, sampled as often.

JDT LS 1.63.0 (milestone 202610191322, EPL-2.0) Result
Download jdt-language-server-1.63.0-202610191322.tar.gz, 51,143,565 bytes, SHA-256 b1f2abe0…bdc4 as the milestone's .sha256 file says; 52 MB unpacked; launched as its own bin/jdtls.py launches it, with -Xmx1g in place of its -Xms1G
jvm/, first start (no Gradle daemon running) initialize 3.0 s; the first error 28.9 s after didOpen, once Buildship had imported the build; it started a Gradle daemon of the wrapper's Gradle 9.8.2 (424 MB) that outlived the server; 1,234 MB peak with the build on
jvm/, next start (its data directory kept, a daemon running) initialize 1.2 s; the first error 6.7 s after didOpen; 512 MB peak with the build off
A Java project folder (bank-project-java, a daemon running) initialize 1.5 s; the first error 5.5 s after didOpen; 976 MB peak
What it reports The method sqrt(int) is undefined for the type Spike and Type mismatch: cannot convert from int to String as errors, an unused field as a warning; hover with the Javadoc of List.add from the JDK's src.zip in 0.26 to 0.64 s; a definition in the file, in another file of the project, and into the JDK as a jdt://contents/java.base/java.util/ArrayList.java?=… URI; 50 completion items after Math. in 0.06 to 0.10 s, marked incomplete
Network With jvm/ as its root it downloaded Gradle wrapper checksums from services.gradle.org (connections to 104.16.72.101:443 and 185.199.109.133:443), whatever its settings say: its wrapper check runs whenever the root holds gradle/wrapper/gradle-wrapper.jar and fetches the checksum of every Gradle version its list names that it has not cached under $XDG_CACHE_HOME/tooling/gradle/. Pointing XDG_CACHE_HOME into the session's data directory, which starts with an empty list ([]), stopped it: no connection beyond the loopback in the later runs. Rooting the session at jvm/java/ instead, which holds no wrapper, made Buildship fall back to its own Gradle 9.7.1 and download it, so the root stays jvm/
What it writes By default .project, .classpath, .settings/ and the build's bin/main/ in every imported project, jvm/java/, jvm/kotlin/ and the runner's build in .cs/runtime/runners/jvm/ included. -Djava.import.generatesMetadataFilesAtProjectRoot=false (read when the server starts, so it cannot be a setting) and java.autobuild.enabled: false leave the folders as they were; the configuration, the index and the caches stay in the data directory (54 to 150 MB per root), and Gradle writes what it writes for cstudy test (.gradle/, ~/.gradle/)
Two sessions of one root One data directory cannot serve two servers (Eclipse locks it), so each session takes the first free <n> under .cs/lsp/jdtls-data/<root>/
Stop shutdown answered in 1 to 6 ms; it exited 0 within 0.2 to 2.3 s of exit; nothing was left in its process group. A Gradle daemon it started is not in the group: it stays idle as a cstudy test build's daemon does, until Gradle's 3 hours
Kotlin LSP 263.7084.0 (kotlin-server-263.7084.0-aarch64.sit) Result
Size 360,201,117 bytes to download (SHA-256 as its .sha256 file says), 1.1 GB unpacked, its own JetBrains Runtime 25 included, default heap 2 GB
License Its README: "The project is currently in the Alpha state" and "based on … proprietary parts of JetBrains Air and Fleet products, making it partially closed-source"; the repository's Apache-2.0 covers the scripts, not the server. The launcher takes --eula=<hash>, "Required for bundled distributions", and license keys (--license-key, --license-server); the standalone archive holds no EULA (Bundle is malformed: EULA.txt is missing)
Diagnostics Pull only: textDocument/diagnostic, which the page asks for from phase 3
jvm/ with the network initialize 2.5 s; Unresolved reference 'sqrt' and Initializer type mismatch: expected 'String', actual 'Int' 37.5 s after didOpen, pulled each second; hover with KDoc; the standard library named by jar:///…/kotlin-stdlib-2.4.21-sources.jar!/… URIs, which are no files; 2,433 MB peak with IJ_JAVA_OPTIONS=-Xmx1g (its own options ask for 2 GB); 575 MB of index per root; it exited 0 within 0.6 s of exit and left the Gradle daemon it started
Network Its Gradle import fetched the source jars of every dependency from repo.maven.apache.org (eight connections to 104.18.18.12:443), into ~/.gradle/; under a sandbox that allowed only the loopback the import failed, and it then reported no error at all and resolved nothing outside the file
Verdict Fails: it reaches the network and misses every error without it, it is too heavy (a 360 MB download, 1.1 GB on disk and 2.4 GB resident for one language), it is alpha and partly proprietary under an EULA cstudy would accept for you, and its diagnostics are pull-only. Kotlin keeps run diagnostics, as phase 2 allows; Revisit names when to look again

Phase 3 measurements

Run on 2026-11-08, on the maintainer's laptop (arm64 macOS, 18 GiB, swap nearly full, a load average of 4 to 5), each server alone, with a client that speaks to the server's standard streams as the broker does and declares the broker's capabilities, on a workspace from cstudy init with a Go attempt of two-sum started. Times count from didOpen; memory is the resident size of the server's process tree, sampled every 0.5 s; network is every socket of that tree, sampled as often.

gopls v0.24.0 on Go 1.27.3 Result
Install go install golang.org/x/tools/gopls@v0.24.0 with GOBIN in a scratch .cs/lsp/bin/, GOTOOLCHAIN=local and GOWORK=off: 9 s with Go's module cache warm (17.5 s cold, in the first spike); a 42.5 MB binary; gopls version prints golang.org/x/tools/gopls v0.24.0
Session Rooted in go/, which gopls finds through the workspace's go.work, with GOTOOLCHAIN=local, GOPROXY=off, GOFLAGS=-mod=readonly and CGO_ENABLED=0: initialize 0.01 to 0.07 s; the first errors 0.12 to 0.21 s after didOpen; 240 to 350 MB resident once settled (gopls alone 237 MB), 310 to 365 MB at the peak, while its go list runs; no socket at any sample; exit within 0.04 s
What it reports undefined: sqrt and cannot use 3 (untyped int constant) as string value as errors; an unused import and unused variables as errors tagged Unnecessary (source compiler, codes such as UnusedVar); no diagnosticProvider, so it only publishes
Hover Signature and documentation as markdown, with no web link (linksInHover false). The links inside the documentation are file: URIs into GOROOT whose fragment is a 1-based line and column, strings.go#314,6
Definition and completion A definition in the file and into GOROOT's src/strings/strings.go; 60 items after strings. in 1 to 2 ms, each carrying its documentation, with no resolveProvider; signature help inside sort.Ints( with its documentation, and none inside a string literal
rust-analyzer Result
rust-analyzer 1.92.0 (rustup component add rust-analyzer on stable 1.92) On a crate of rust/'s shape, with the broker's capabilities: initialize 0.16 s; 479 MB resident; exit at once. Before its workspace is loaded it answers a pull with an empty report (its default while the file system or the crate graph is not ready), asks for workspace/diagnostic/refresh about 1.1 s after didOpen, and while the rest of the load runs cancels a pull with ServerCancelled (-32802) and retriggerRequest true, answered 5.4 s after it was sent in one session, so a client must ask again; the page asks again, waiting 0.5 s, then twice as long each time up to 8 s, at most 8 times. Then its own diagnostics are pulled: a syntax error (syntax-error) at once. An unknown function (E0425), an unresolved import (E0432) or an unknown method (E0599) is not among them: cargo check reports them, published 1.4 s after didOpen (it checks once the workspace is loaded) and 0.2 s after each didSave, with rustc's unused_variables tagged Unnecessary. nums.len() on a Vec is defined in alloc/src/vec/mod.rs of the toolchain's rust-src. In a workspace from cstudy init, rust/.cargo/config.toml replaces crates.io with the runtime's vendored crates, and cargo applies that to the standard library's own Cargo workspace too, which rust-analyzer loads with cargo metadata: cfg-if and the other dependencies of std are not found, rust-analyzer loads the library without them, and Vec or len resolve to nothing. rust-analyzer 1.92.0 has no setting that skips that query (its --print-config-schema lists cargo.sysroot and cargo.sysrootSrc, no sysrootQueryMetadata), but it reads the library's crates directly when the directory it is given has no Cargo.toml. So each session links the library of the toolchain its root selects (rustc --print sysroot, run in the root) into .cs/lsp/rust-library/<root>/, one link per entry but the manifest and lock, and gives that directory as cargo.sysrootSrc, in the initialization options and the rust-analyzer section only: rust/.cargo/config.toml and the builds of cstudy test stay as they are. Measured in a workspace from cstudy init: hover on Vec and len with the standard library's documentation, len's definition in .cs/lsp/rust-library/rust/alloc/src/vec/mod.rs, 100 completion items after nums. (len, push, iter); 465 MB resident. Without rustc or rust-src nothing is linked and rust-analyzer looks for the library itself
From its source It always declares a diagnosticProvider (identifier rust-analyzer); a client that declares textDocument.diagnostic gets its own diagnostics by pull, and workspace/diagnostic/refresh when they change and after each cargo check, while cargo check's diagnostics are still published; a client that does not gets them all published. It tags rustc's unused_variables, unused_imports, dead_code and the other unused lints Unnecessary, and deprecated Deprecated (diagnostics/flycheck_to_proto.rs)
Before The first spike: hover and definitions into core/src/slice/mod.rs at once, cargo check errors 3.0 s after didSave, 200 MB

Kotlin revisited

The owner reopened Kotlin on 2026-11-08 (O5): "do what we need to do with kotlin, users can accept the license, if there is an opensource version we can try it also". Every Kotlin language server was looked for first, from its repository, release page and license files, with no server running:

Server What its sources say
fwcd/kotlin-language-server MIT. Its README opens with "There is now an official language server, so this project can be considered deprecated". Latest release 1.3.13, 2025-01-18 (server.zip, 87,291,855 bytes, no checksum published), last commit 2025-06-02. It embeds the Kotlin 2.1.0 compiler and its K1 analysis (gradle/libs.versions.toml), and runs on Java 11 or later
ktlsp, a fork of it on Codeberg MIT, kept up since 2025 by one maintainer. Latest 1.4.0-rc1, a prerelease of 2026-08-02 (server.zip, 91,014,096 bytes, no checksum published); last commit 2026-09-20. It embeds the Kotlin 2.2.21 compiler, needs Java 21 or later, and keeps its database and logs in .kls/ in each project's root unless KLS_HOME says where
JetBrains Kotlin LSP Latest v263.7084.0, 2026-10-17, still Alpha: "based on the most recent IntelliJ IDEA version and proprietary parts of JetBrains Air and Fleet products, making it partially closed-source". The repository's Apache-2.0 covers its scripts and the editor extension's sources; the VS Code extension that bundles the server is under the JetBrains Free Plugin License Agreement 1.0 since v262.7569.0. The standalone archive, one per platform with a .sha256 file each, carries third-party notices only and no license or EULA of its own
fwcd/kola GPL-3.0, "Experimental language server for Kotlin, written from scratch using Tree-sitter", last commit 2024-05-29: a parser without type checking, so no type errors

Spikes on 2026-11-08, on the maintainer's laptop (arm64 macOS, 18 GiB, swap nearly full, another writer's browser tests alongside), each server alone and only while the machine had memory to spare (1.5 GB of free swap at first; later, since macOS resizes its swap, at least 25% of memory free by memory_pressure), with a client that speaks to the server's standard streams as the broker does, on a workspace from cstudy init warmed up by cstudy doctor --fix on Temurin 25.0.5, with a Gradle home of its own. Times count from didOpen; memory is the peak resident size of the server's process tree and of any Gradle daemon it started, sampled every 0.5 s, and of the server process alone; network is every socket of those processes, sampled as often; the heap cap is read from the running JVM with jcmd <pid> VM.flags. The practice file has an unresolved name (sqrt) and a type mismatch (val name: String = top).

fwcd/kotlin-language-server 1.3.13 Result
On JDK 25.0.5 It exits 1 before it answers initialize: IllegalArgumentException: 25.0.5 in com.intellij.util.lang.JavaVersion.parse, from the Kotlin 2.1.0 compiler it embeds, which cannot parse JDK 25's version. It was not run further: its compiler is older than ktlsp's, which already cannot read the workspace's standard library
ktlsp 1.4.0-rc1 Result
Launch Its own java -Xmx1g -XX:+UseSerialGC -cp <lib>/* org.javacs.kt.MainKt on JDK 25.0.5, so the cap holds: MaxHeapSize 1,024 MB
jvm/ initialize 17.9 s. Its Gradle tasks (kotlinLSPKotlinDSLDeps) fail with the workspace's configuration cache and write jvm/build/reports/; it started a Gradle daemon (512 MB heap) that stayed, and opened one connection to 104.18.19.12:443; 1,387 MB peak with the daemon, 335 MB for the server. With the configuration cache off (GRADLE_OPTS=-Dorg.gradle.configuration-cache=false): initialize 3.1 s, 400 MB, no socket beyond the loopback
What it reports Errors 0.8 to 1.2 s after didOpen, but wrong: Unresolved reference: mutableListOf and Unresolved reference: maxOf, both of the standard library, beside sqrt, and no type mismatch; no hover on add or mutableListOf; no definition of mutableListOf; four items after seen.a (plus, toString). Its log has kotlin-stdlib-2.4.21.jar on the classpath: its Kotlin 2.2.21 compiler reads metadata up to 2.3, so the workspace's 2.4.21 standard library is unreadable to it
Stop shutdown in 55 ms, exit 0 within 0.3 s, nothing left in its process group; it keeps its database and logs in KLS_HOME
Verdict Fails: it marks valid Kotlin as wrong and resolves nothing of the standard library, and its maintenance rests on one person's prerelease
Kotlin LSP 263.7084.0 (--version: 263.7084.0-EAP) Result
License state intellij-server license status: "License: licensed. Source: eap (Valid) … valid through 2026-11-12" and "This build does not require a license". It has commands to sign in with a JetBrains Account, activate a code or a license server and start a trial, which this build does not ask for
Heap Its native launcher reads bin/intellij-server.vmoptions (2 GB of heap, 512 MB of code cache) and appends IJ_JAVA_OPTIONS after it, as intellij-community's launcher does (native/XPlatLauncher/src/default.rs), so -Xmx1g there wins: MaxHeapSize 1,024 MB. Phase 2's cap held too; its 2.4 GB was the server's own memory beyond the heap and the Gradle daemon the import started
jvm/ with the network, first start initialize 4.7 s; it asked for a refresh 11 times while it imported and indexed, and the pulled diagnostics held Initializer type mismatch: expected 'String', actual 'Int'. and Unresolved reference 'sqrt'. 76.4 s after didOpen; hover on add in 0.64 s with its KDoc (Adds the specified element to the end of this list.) and its declaration; a definition in the file in 0.15 s, and mutableListOf in jar:///…/kotlin-stdlib-2.4.21-sources.jar!/…; 12 items after seen.a (add, addAll, addFirst …), marked incomplete, in 0.72 s. 1,915 MB peak, 1,859 MB of it the server, plus a Gradle daemon (512 MB heap) that stayed
Network Its Gradle import downloaded the sources jar of every library from repo.maven.apache.org (104.18.19.12:443): coroutines, the JUnit platform, the Kotlin Gradle plugin's and others, 459 lines of its log. The server itself connected to 13.33.82.67:443, a CloudFront address: its update check (UpdateKt, which sends an installation id), which -Dintellij.updates.enabled=false turns off. It shares no data by default (--data-sharing is none)
-Dcom.jetbrains.ls.imports.gradle.offline=true, loopback only Its Gradle sync fails at once (NullPointerException: getProperty(...) must not be null): the switch also needs com.jetbrains.ls.imports.gradle.selfContainedProxyUrl, a repository proxy of JetBrains' own setups. No error in 400 s, no hover, no completion; 483 MB
cstudy doctor --fix in a new workspace, its own Gradle home Asked Accept it and download kotlin-lsp? [y/N]:, recorded [licenses.kotlin-lsp] in .cs/workspace.toml on y, downloaded the archive, and warmed the server up on jvm/ after the Gradle warm-up: the whole --fix took 1 min 43 s, and the warm-up left 18 sources jars in Gradle's cache, kotlin-stdlib-2.4.21-sources.jar among them, and no scratch directory. cstudy doctor: ok code intelligence kotlin kotlin-lsp 263.7084.0
jvm/ offline after the warm-up The session's own command and options from the catalog, in a sandbox that denies every connection beyond the loopback, the Gradle daemon started inside it (Java sockets on IPv4, which the sandbox's loopback rule needs). First start, its data directory empty: initialize 3.3 s, both errors 38.0 s after didOpen, hover with KDoc in 0.3 s, mutableListOf in the stdlib's sources jar, 12 items after seen.a. Next start, its data directory kept: initialize 8.2 s, both errors 8.1 s after didOpen, the same answers, 1,001 MB peak with the serial collector and the 240 MB code cache, MaxHeapSize 1,024 MB. No socket beyond the loopback, exit 0 in 1.4 s, nothing left in its group
A project folder offline (bank-project-kotlin, after the same warm-up on jvm/ only) initialize 7.3 s; both errors 86.7 s after didOpen (a first start, with an index of its own, 598 MB); hover on sorted with its KDoc; Account defined in the folder's own file; 49 items after .so; 2,014 MB peak; no socket beyond the loopback; it wrote only Gradle's .gradle/ into the folder. The warm-up on jvm/ fetched what a project folder's import reads
The real-server test, the license accepted (CSTUDY_ACCEPT_LICENSE=kotlin-lsp) Through a session of cstudy serve's broker, over the practice workspace's jvm/ build: 10 passed in 42 s, with the errors pulled, the KDoc of add, a definition in the file and one in kotlin-stdlib-2.4.21-sources.jar, which the broker refuses to read and names, and add after seen.ad. Without a Gradle build the Kotlin LSP resolves nothing of the standard library. Again with the newest build fetched as --fix fetches it: 10 passed in 68 s, the 360 MB download included
cstudy doctor --fix fetching the newest build, a new workspace, 2026-11-08 It read the release list, took 263.7084.0, the newest (2026-10-17), read kotlin-server-263.7084.0-aarch64.sit.sha256 (b403bf8a…94b8), named the license read at the release's tag, JetBrains Free Plugin License Agreement 1.0, and on y downloaded the archive, checked it, asked it its last day and recorded installed.json with last_day 2026-11-12; the whole --fix, with the Gradle and Kotlin warm-ups, took 2 min 27 s. cstudy doctor: WARN code intelligence kotlin kotlin-lsp 263.7084.0 runs until 2026-11-12 (5 days left), as JetBrains' early-access builds stop; cstudy doctor --fix fetches a newer one once there is, with fix: cstudy doctor --fix. A second --fix asked nothing and downloaded nothing: kotlin-lsp 263.7084.0 is JetBrains' newest build, and it is in place
An expired build The build before this one, 263.6379.0 (released 2026-10-03), exits 7 at start today: This build of kotlin-server has expired. … Please download a new build from https://github.com/kotlin/kotlin-lsp, and license status prints the same. So 263.7084.0 stops on 2026-11-13, and no newer release exists on the releases page on 2026-11-08
What it writes Into --system-path, 574 MB of index for jvm/; into idea.log.path, 2 MB of logs, with OpenTelemetry metrics kept on disk; nothing under ~/Library/Caches/JetBrains, ~/Library/Application Support/JetBrains or ~/Library/Logs/JetBrains once idea.config.path, idea.log.path and idea.plugins.path point into the data directory; Gradle writes jvm/.gradle/, as for cstudy test
Stop shutdown in 54 ms, exit 0 within 1.4 s of exit, nothing left in its process group; the Gradle daemon it started stays idle, as a cstudy test build's does

Decision. JetBrains' Kotlin LSP, its newest build, behind its license. Of the open-source servers, fwcd's does not start on JDK 25 and ktlsp cannot read Kotlin 2.4, so neither gives correct diagnostics, hover, definitions or completion on the workspace's Kotlin and Gradle; supporting both is moot. What the choice takes:

  • The license, accepted by you. The standalone archive carries no license of its own, so cstudy names the one JetBrains ships the same server under, the JetBrains Free Plugin License Agreement, with its link. cstudy doctor --fix downloads nothing for Kotlin until you accept it, at a terminal or with --accept-license kotlin-lsp; elsewhere, as in the Health view's Fix, it declines. The acceptance is recorded in the workspace's marker, .cs/workspace.toml, as [licenses.kotlin-lsp] with the agreement's name and link, and holds while they match. Each build comes under the agreement at its release's tag (kotlin-vscode/LICENSE.txt), whose title and version give the name: when a newer build comes under a newer version, --fix asks again before it downloads. Until then the doctor row, Settings and the status bar say so, with the command, and no session runs the server (cli).
  • The newest build, fetched and checked. cstudy pins no build: each one stops within weeks, so a pin would stop working before most users upgrade. --fix reads the release list from GitHub's API (https://api.github.com/repos/Kotlin/kotlin-lsp/releases) and takes the newest release that is not a draft and whose notes link this machine's archive on download.jetbrains.com, one of six (macOS, Linux and Windows on x64 and arm64), with its checksum beside it. The checksum is the .sha256 file JetBrains publishes next to each archive (…/kotlin-server/263.7084.0/kotlin-server-263.7084.0-aarch64.sit.sha256), fetched separately over HTTPS before the archive: GitHub lists no assets for these releases, so it has no digest of its own to offer. A release without that file, or a file that names another archive, gives no build, and --fix downloads nothing. The archive is checked against it, unpacked into .cs/lsp/kotlin-lsp/server/ without its top directory (zips keep their Unix modes and symbolic links, which its runtime holds), and asked its last day with intellij-server license status, which starts no server. .cs/lsp/kotlin-lsp/installed.json records the version, the last day, the license, the URL and the SHA-256; the doctor row, Settings and sessions read that record and nothing else. When the newest build is the one in place, --fix says so and downloads nothing.
  • The network only in --fix. The release list, the checksum, the license and the archive are read there and nowhere else. After the Gradle warm-up, --fix warms the server up once on jvm/, online, with JetBrains' own bin/warmup.py under cstudy's Python in isolated mode: the import fetches the sources it reads into Gradle's cache, and the index goes into a scratch directory that is gone afterwards. Sessions then run with no update check, and measured with nothing reachable they start and answer on jvm/ and on a project folder. Gradle's import stays online, since the offline switch needs a proxy, and finds in its cache everything a session asks for. What remains: a project folder whose build names a library the workspace's warm-up did not, or a Gradle cache cleared since, sends the import to the network again, and without it the import fails, as phase 2 measured, until --fix runs online.
  • Pull diagnostics, which phase 3 added: the page asks textDocument/diagnostic and asks again on each refresh.
  • Memory. About 1.9 GB for one session, under its 1 GB heap, the most of any server; two Kotlin tabs approach 4 GB. The idle time is JDT LS's, 5 minutes.
  • The hidden directories are kept from it as from JDT LS: Kotlin names no file by its path, so a document reaches a class only through the root's Gradle build, which never includes .cs/build/, .cs/cases/ or .cs/runs/; the broker's filtering stays.
  • Definitions into libraries. A source in a jar (jar:///…-sources.jar!/kotlin/…) is no file: the note at the click names the jar and the path inside it, as a jdt:// class's names its module and file.
  • Each build expires. JetBrains ships the Kotlin LSP as early-access builds whose built-in license runs a few weeks from release, and a build past it exits at start (measured on 263.6379.0). The last day comes from the build itself, as license status prints it (valid through 2026-11-12), and is recorded with it. The doctor row names it while it runs (ok code intelligence kotlin kotlin-lsp 263.7084.0, runs until 2026-11-12) and warns, with fix: cstudy doctor --fix, once fewer than 7 days are left (kotlin-lsp 263.7084.0 runs until 2026-11-12 (4 days left), as JetBrains' early-access builds stop; cstudy doctor --fix fetches a newer one once there is). From the day after, its probe says expired before anything else: the row warns kotlin-lsp 263.7084.0 expired on 2026-11-13, as JetBrains' early-access builds do with fix: cstudy doctor --fix, Settings and the status bar say expired on 2026-11-13: run cstudy doctor --fix, and no session starts. --fix then fetches the newest build; if JetBrains has published none newer, it fails with kotlin-lsp <version>, JetBrains' newest, has expired, and records nothing. A build whose status names no last day is recorded without one and never warns. The slow Kotlin test fetches the newest build the same way and skips, naming why, when none can be fetched.

Sessions: one WebSocket per tab and root

  • Route. GET /api/v1/code-intelligence?attempt_id=N, upgraded to a WebSocket. The server derives the language and the root from the attempt, which must be in progress, and the page opens one session per root it shows files of; a later attempt in the same root reuses it. Each text message carries one JSON-RPC message, without the Content-Length header that standard streams use.

  • WebSocket here only. A language-server session is one ordered stream in both directions, mostly started by the server, and lives as long as the tab. In Chromium and Firefox a WebSocket costs none of the six HTTP/1.1 connections per host that web-ui budgets for streams; WebKit's pooling is not verified, so a browser test holds two visible tabs, each with its streams and a session, and saves a file from each. A closed tab ends its sessions at once. Every other client action stays an ordinary request, as ADR 0015 decided.

  • wsproto. uvicorn starts with ws="wsproto", per-message compression off and at most 4 MiB per message. Naming the implementation keeps an installed websockets package from replacing it.

  • One server per session. Tabs share nothing: LSP has one client per server (one initialize, document versions the client owns, server requests addressed to that client). The servers measured take 40 to 200 MB on practice-sized projects, so cstudy serve runs at most four; a fifth session closes with code 4003 and a message that names the limit.

  • The broker. Between the socket and the server's standard streams, the web adapter:

    1. Rewrites initialize: processId becomes the server's own PID, rootUri and workspaceFolders become the root, and the initialization options and the client capabilities the broker implements come from cstudy's catalog of servers.
    2. Answers the server's housekeeping requests itself: workspace/configuration from the catalog, client/registerCapability (it keeps file-watch registrations), window/workDoneProgress/create and window/showMessageRequest. It refuses workspace/applyEdit, since nothing in the first phases edits through the server.
    3. Checks every text document the page names: a file: URI inside the root, outside untracked paths (node_modules, .venv, caches, build output). Any other document gets an error response, or is dropped for a notification.
    4. Renders the Markdown documentation of hover answers, resolved completion items and signature help to HTML (Hover, Autocomplete), and records the locations that definition answers name (Go to definition).
    5. Forwards the notification hub's file changes inside the root as workspace/didChangeWatchedFiles.
  • Lifecycle. A session starts its server once the CSRF message arrives and ends it when the socket closes: shutdown and exit, then standard input closed, SIGTERM to the server's process group 3 s later and SIGKILL 2 s after that, as Cancel escalates. The page closes a session whose files have all been closed for 60 s, and a hidden tab's sessions after 5 minutes; showing the tab opens them again. A server that exits on its own closes the socket with code 4002, its exit code and its last line of standard error, and the page offers Restart. Ctrl-C in cstudy serve stops every language server before it waits for its open responses, as it stops runs.

  • Orphans. Each server starts in a session of its own, so its whole process group is stopped. If cstudy serve dies, the server sees end of file on its standard input, and a server that follows LSP's processId rule also exits when that PID is gone.

  • Reconnects. After an unexpected close the page tries again after 1, 2 and 5 s; the client initializes again and opens its files again, so nothing needs replaying.

  • Warm-up (owner, 2026-11-10). While cstudy serve runs with code intelligence on and the default language's server usable, it starts that one server as it starts, in the language's practice project, never a sidecar and never another language's. A broker of its own initializes it, and the first session of that target takes it over: the page's initialize gets the server's answer, and its initialized is not sent twice, since LSP initializes a server once. It stops after WARM_IDLE_S, 600 s, with no session taking it over, counts among the four servers, and gives its slot to a session of another target that needs one (Warm-up). One warm-up per start keeps it simple: a server a session took over ends with that session, as any does.

Security

The session lets the page open documents, ask the server about them and read the files it names. Each control keeps other pages and programs out:

Threat Control
Another web page, including one on another 127.0.0.1 port The handshake needs a Host and an Origin from the allow-lists. The cookie alone does not keep out a page on another port: the spike's browsers sent it. A refusal comes before the upgrade, as 403
A request forged from a page The CSRF token in the session's first message, compared in constant time. A WebSocket cannot carry the X-Cstudy-CSRF header, and the session reads files and starts processes, as unsafe requests do
Another program on this machine The session cookie, as for every route
Files outside the attempt Text documents only inside the root (The broker). A library file is read only when the server named it as a definition in this session, only as a regular UTF-8 file up to 4 MiB, and never under .cs/build/, .cs/cases/, .cs/runs/ or the content root. A Node server cannot open those directories either (Servers)
Script injection through documentation Hover, completion and signature documentation is rendered on the server with raw HTML disabled and no style attribute, as statements are; the page inserts no other server text as HTML, so completion labels, details and signature labels are text
Large or many messages 4 MiB per message; document text up to 1 MiB, the file API's limit; no compression
Code the servers run They run as you, on your code. rust-analyzer runs build scripts and procedural macros, and JDT LS runs Gradle scripts, as cstudy test builds do; the others run no workspace code

The Content Security Policy is unchanged: connect-src 'self' covers the session's ws: URL in every engine the browser tests cover.

Documents: buffers, disk and the watcher

  • The tabs' files are the server's open documents: didOpen with the tab's text, unsaved edits included; didChange 500 ms after the last change and before every request; didClose when the tab closes; and didSave after each save the page makes, through the existing cstudy:file-saved event. The server reads every other file from disk. Positions are UTF-16 offsets, LSP's default and CodeMirror's own.
  • A change on disk reaches the server as it reaches the tab: a tab without unsaved edits takes the new version, which is a change like typing, and under the conflict banner the server keeps checking what the tab shows. Files no tab shows, such as a level's new test file or a module edited in an IDE, reach it through the forwarded file-watch events.

Diagnostics

  • Two sources, one lint set. The editor keeps the last run's diagnostics as today, cleared at the next run_start, and the server's, replaced by each publication. A run diagnostic and a live one on the same line with the same message show once. Editor gains a second source in place of setDiagnostics replacing everything, and @codemirror/lsp-client's serverDiagnostics() is not used.
  • What each shows. An error is underlined in red with a gutter marker, a warning in yellow, information in blue; a hint has no underline and no marker. A diagnostic tagged Unnecessary shows as faded text and one tagged Deprecated as struck through, as LSP 3.17 allows. Each names its source: basedpyright reportUndefinedVariable, ts 2304, go, rustc E0433, or last run.
  • Pull and push. The page reads pushed diagnostics (textDocument/publishDiagnostics) and, from phase 3, asks a server that answers requests (textDocument/diagnostic), as TypeScript 7's does: after a file opens, after each change it sends, on reconnect, and for every open file when the server asks for a refresh, which the broker answers and passes on. Published and pulled diagnostics are two sources of the file's live set, an exact repeat shown once. The broker declares pull without dynamic registration and without related documents: basedpyright pulls only for a client that registers it dynamically, and typescript-language-server, JDT LS and gopls never pull, so they keep publishing, while rust-analyzer answers for its own diagnostics as you type and publishes cargo check's, as it does in VS Code (Phase 3 measurements).
  • What a learner meets. Errors show about half a second after typing stops for Python and Go and about a second for TypeScript, as measured. Rust's cargo check errors show after each save. A fresh stub's unused parameters are faded hints, not errors. A Rust stub's parameters draw rustc's unused variable warning, which rust-analyzer tags Unnecessary, so it shows faded too (Phase 3 measurements). A newly unlocked level's test file shows errors for the methods the level asks for until they exist, as an IDE shows them.

Hover

  • With the pointer at rest (CodeMirror's 300 ms), or with Cmd or Ctrl-K, then Cmd or Ctrl-I at the cursor, the page asks for the hover and shows the HTML the broker rendered: markdown-it-py with raw HTML disabled and Pygments code blocks, the renderer and classes of statements and hints. From phase 3, a file: link in hover documentation to a file outside the hidden directories becomes a button that opens the library tab at the line its fragment names (gopls's #314,6), and the broker records the file as one the page may read; in phases 1 and 2, and in completion and signature documentation, such links show as their text. Web links stay links. A diagnostic under the pointer shows in the same tooltip box, above the documentation.
  • @codemirror/lsp-client's own Markdown renderer is not used. The package imports one Markdown library, marked, and the build replaces it with an escaping stand-in, so the bundle still holds no Markdown library; a fast test checks that the chunk holds none.

Go to definition

Cmd-click on macOS, Ctrl-click elsewhere (on macOS Ctrl-click is the context menu), F12, or Vim's gd and Ctrl-] go to the definition of the symbol at that position, through @codemirror/lsp-client's jumpToDefinition and the page's Workspace.displayFile. With Cmd or Ctrl held, the word under the pointer is underlined and the pointer becomes a hand, as in IntelliJ IDEA; nothing is requested until the click. A jump records where it started.

Target What happens
The same file The cursor moves there, scrolled into view
Another file of the attempt, such as a project's module or a generated test file Its tab opens, or comes forward, at the definition
A file outside the attempt: the standard library, typeshed, node_modules, .venv, GOROOT, the Rust sources, the runner's support code, another practice file A read-only tab with a library badge and the file's path, at the definition. It cannot be saved, has no language session in phases 1 to 3, and closes like any tab
A file over 4 MiB, not UTF-8, or not a file: URI (JDT LS's jdt:// class files, in phase 2) No tab: a note at the click names the file and the line
A file under .cs/build/, .cs/cases/, .cs/runs/ or the content root Refused with not shown: cstudy's build area, so a reference solution is shown only through the Solution pane and its question. The broker leaves such a location out of a definition answer, so a click on one reports no definition found
Several locations, as for an overloaded function The first, as the client chooses; a chooser comes later
No location Nothing moves; the status bar says no definition found

Library sources open read-only rather than refusing them or showing a hover alone: in single-file practice the most frequent target is the standard library (sorted, heapq, Map.prototype.get), and installed packages are no place for edits.

Autocomplete

  • A second preference that needs the first. autocomplete is off by default. The Settings view shows it under code_intelligence, disabled with the note Turn on code intelligence first while that is off. Turning code_intelligence off stops completion and signature help at once and keeps autocomplete as stored, so turning it on again brings them back as they were. The preferences document holds both values as set and PUT accepts any combination; the page applies autocomplete only while both are true.
  • All completion, not only the server's (owner, O3). While autocomplete does not apply, the editor offers no completion list at all, neither as you type nor on Ctrl-Space, and no signature help. This changes what every user has today: basicSetup gave every editor CodeMirror's completion, and with both settings at their defaults it is gone. Practice without any completion is the point: the setting lets a learner test what they recall. Bracket closing, which lives in the same package, is not completion and stays.
  • What it covers. Completion from the server as you type, on a word character or one of the server's trigger characters (. in both servers), after CodeMirror's 100 ms; completion on Ctrl-Space at any time; and signature help, which opens when you type a call's ( or , and on Cmd or Ctrl-Shift-Space, follows the active parameter, and closes when the cursor leaves the call or on Escape. Signature help belongs to the same setting because it too suggests what to write, as IntelliJ IDEA's parameter info does while you type.
  • What the list shows. Each item's label and kind icon, filtered and ranked by CodeMirror as you type. The page asks the server again only when the server marked its list incomplete, as basedpyright does, or the typed prefix leaves the list's range; a newer request cancels an older one with $/cancelRequest. The selected item's signature and documentation show in the info panel beside the list, from completionItem/resolve, the only way the measured servers deliver them; each item is resolved once per list.
  • What accepting inserts. The item's text, as plain text. The broker declares no snippet support, so an item never leaves placeholders to step through. Completions that add an import are off (basedpyright's autoImportCompletions, typescript-language-server's includeCompletionsForModuleExports), since adding an import is a quick fix, which stays out of scope. Tab is not an accept key: it indents, as today.
  • The page's own completion source and signature tooltip. They are written against @codemirror/autocomplete and CodeMirror's tooltips, not @codemirror/lsp-client's serverCompletion and signatureHelp: those never resolve an item, so the measured servers' items would show labels without a signature or documentation, and they render documentation with marked, which the build replaces. The broker renders the documentation of a resolved completion item and of each signature as it renders hover: markdown-it-py with raw HTML disabled and Pygments code blocks.
  • The editor's own completion as the fallback. CodeMirror's completion from the language supports (Python's builtins and the file's names, TypeScript's snippets and the file's names) shows only while autocomplete applies. While the file's session is ready, the server's completion replaces it in that file, so no name is offered twice; while the session is starting, has stopped, or the language has no server installed or none yet, the editor's own completion is what shows. Signature help comes from the server only.
  • No restart. Every session declares completion and signature help to its server, and the page asks for them only while autocomplete applies, so turning it on or off never restarts a server.
  • Vim. Completion and signature help work in insert mode as they do without Vim, with the same keys; normal mode inserts no text, so it opens neither. One Escape closes the list or the signature help and leaves insert mode, as in LazyVim.
  • Phase 1, with Python and TypeScript. @codemirror/autocomplete is already in the main bundle through basicSetup, so autocomplete adds only the page's completion source and signature tooltip to the code-intelligence chunk, within its budget. Each later language gets autocomplete in its phase.

Keyboard, mouse and Vim

Action Keys With Vim, in normal mode
Go to definition F12; Cmd-click (macOS) or Ctrl-click gd, Ctrl-]; F12 and the click work too
Back to where the last jump started Ctrl-Minus, VS Code's binding on macOS. On Linux and Windows it is also the browser's zoom-out key, which the editor takes while it has the focus; the browser tests check each engine Ctrl-o, through Vim's jump list
Hover at the cursor Cmd or Ctrl-K, then Cmd or Ctrl-I; Escape closes it K
Next and previous diagnostic F8 (as today) and Shift-F8, skipping hints ]d and [d
The file's diagnostics as a list Cmd or Ctrl-Shift-M, CodeMirror's lint panel The same
Completion, with autocomplete on (off, no key opens a list) As you type, or Ctrl-Space; on macOS also Option-` and Option-I, CodeMirror's, since macOS may take Ctrl-Space to switch input sources. The arrows, PageUp and PageDown move; Enter accepts; Escape closes In insert mode the same, except that Escape closes the list and leaves insert mode
Signature help, with autocomplete on Opens on ( and , in a call, or with Cmd or Ctrl-Shift-Space; Escape closes it In insert mode the same, except that Escape closes it and leaves insert mode
Add a cursor, whether the setting is on or off Alt-Shift-click (Option-Shift-click), IntelliJ IDEA's binding; Alt-drag stays rectangular selection. Cmd-click and Ctrl-click never add a cursor: with the setting off they move the cursor like a plain click The same
  • The Vim keys are those of the owner's editor (LazyVim: gd, K, ]d and [d). They are mapped with Vim.mapCommand while the setting is on, and a jump enters Vim's jump list through Vim.getVimGlobalState_().jumpList. A click under Vim moves the cursor and stays in normal mode.
  • Adding a cursor moves to Alt-Shift-click in both modes (owner, 2026-11-03), so turning the setting on or off never changes what a click does to the selection. With the setting off, every other click and key behaves as today, except that no key opens a completion list (Autocomplete).
  • A hover opened from the keyboard is read out by the page's polite live region (its first paragraph, as plain text). The library tab's editor names its path and read-only for screen readers. The status bar shows the active file's session (python · basedpyright · ready, starting, not installed, stopped: exit 1 · Restart) and its counts (2 errors · 1 warning).

Without a server

  • cstudy doctor gains a code intelligence <language> row for each language while the preference is on: ok with the server and its version; WARN with the fix when it is missing (fix: cstudy doctor --fix; for Rust, fix: rustup component add rust-analyzer); WARN naming the JDK for Java below 25; and, for Kotlin, WARN naming its license with fix: cstudy doctor --fix --accept-license kotlin-lsp until you accept it (Kotlin revisited). A row checks by running the server's version command, because a rustup proxy can exist without its component. The Health view shows the rows, and its Fix job installs.
  • cstudy doctor --fix installs what those rows need, only while the preference is on, so a user who never turns it on downloads nothing, and the Kotlin LSP only once you accept its license. Its confirmation already says it may need the network.
  • In the editor, a language without a server shows one line in the status bar (no code intelligence for Go: gopls is not installed · Health), and the file works as it does today.

Front end and bundle

  • The page's code-intelligence chunk holds @codemirror/lsp-client (the client, the plugin, the workspace class, the definition commands) and the page's own transport, workspace, diagnostics, hover, click handling, completion source, signature tooltip and status. It imports @codemirror/autocomplete from the main bundle, which already holds it. It loads when the preference is on and a file of a language with a server opens, after the editor is editable, so NFR-12's 600 KB budget before a first file is editable is unchanged.
  • NFR-12's whole-bundle budget leaves the chunk out, as it leaves out the Vim chunk, and the chunk gets a budget of its own: at most 64 KB raw and 24 KB gzip.
  • editor.ts builds its setup from basicSetup's parts, so adding a cursor moves to Alt-Shift-click for every user and Alt-drag stays rectangular selection, and completion sits in a compartment of its own that holds nothing while autocomplete does not apply.

Testing

Layer What it proves How Marker
Broker Framing; the rewritten initialize, without snippet support; the housekeeping answers; documents outside the root refused; the CSRF first message; hover, resolved-completion and signature HTML with raw HTML escaped, and file: links shown as their text in phase 1; library reads (definition targets only, .cs/build/ and the content root refused, the size limit, links followed); the four-server limit; the idle end; end of file and the SIGTERM and SIGKILL escalation; Ctrl-C A fake language server (tests/fake_language_server.py, scripted as tests/scripted_child.py is) under Starlette's TestClient.websocket_connect, which runs in-process and needs no wsproto fast
Security matrix The handshake refused for a bad Host, an Origin on another port, no cookie, and a wrong or missing CSRF message The same fast
Doctor The rows and the fix: missing, installed, a rustup proxy without the component, a JDK below 25, the preference off Fakes, as in tests/application/ fast
Preferences code_intelligence and autocomplete default to false, a stored file without them reads them as false, and PUT stores any combination Unit tests of domain/preferences.py and of the preferences route fast
Front end The merge of run and live diagnostics, tags to classes, URIs to tree paths, the definition targets of the table above, Cmd or Ctrl by platform, the reconnect delays; completion items to options (ranges, kinds, incomplete lists), resolve once per item, autocomplete applied only while both preferences are on, no completion at all while it does not apply, and the editor's own completion replaced only while the session is ready node --test, run by build.sh fast
Bundle The chunk within its budget and without marked; NFR-12 without the Vim and code-intelligence chunks The committed files fast
Real servers basedpyright and typescript-language-server on the test workspace: an undefined name is an error, sorted has documentation, a definition opens builtins.pyi read-only, completion after heapq. offers heappush and its resolved item has documentation, and the same for Math.max in TypeScript The slow workspace fixtures, skipped while .cs/lsp/ is not installed slow
Browser In each engine, against the fake server: the underline and gutter marker, faded unused code, hover by mouse and by keys with the live region, Cmd-click or Ctrl-click and F12 in the file, into another tab and into a library tab, Alt-Shift-click adding a cursor, Ctrl-Minus back, Vim's gd, K and Ctrl-o; with autocomplete off, no list on Ctrl-Space; with it on, the list on . and on Ctrl-Space with its info panel, Enter accepting, signature help on (, and one Escape under Vim closing the list and leaving insert mode; the autocomplete checkbox disabled while code intelligence is off; two visible tabs that each hold a session and still save, no CSP violation, and axe on the tooltip, the completion list and the library tab Playwright, in the optional browser group slow

The fake server keeps the fast and browser tests deterministic: they wait for what the page draws, never for time. CI runs the fast tests, as task F9's workflow does; the real servers and the browsers stay in the local gate, with the slow and browser tests.

Phases

Phase Scope
1 The two preferences, the Settings view, the doctor rows and their fix, the session route with wsproto, and Python and TypeScript: live diagnostics, hover by mouse and keyboard, go to definition into the file, the attempt's files and read-only library sources, with Vim keys, and, behind autocomplete, completion and signature help
2 Java on JDK 25 and 26 only (25 is the JDK to install), after a spike that measures JDT LS's start and memory on jvm/ and a project folder; Kotlin in the same release, starting from a spike of the alpha Kotlin LSP on jvm/kotlin and a Kotlin project folder. If the Kotlin spike fails (it does not start offline, misses errors, or is too heavy), the owner is told before anything is built and Java ships alone. Done: Java ships with diagnostics, hover, definitions and, behind autocomplete, completion and signature help; the Kotlin spike failed (Phase 2 spikes), so Java ships alone
3 Go and Rust, autocomplete included; pull diagnostics; documentation links that open library sources. Done: gopls, built by cstudy doctor --fix at the version the selected Go pins, and the rust-analyzer on PATH, which cstudy never installs; pulled diagnostics beside published ones; hover links into GOROOT that open the library tab (Phase 3 measurements)
After 3 Kotlin, from the owner's answer O5: JetBrains' Kotlin LSP behind a license each user accepts, after a spike of every Kotlin server. Done: diagnostics by pull, hover, definitions and, behind autocomplete, completion and signature help, with the license step of cstudy doctor --fix and its warm-up (Kotlin revisited)
Service projects ADR 0019's P9, for TypeScript and Python. Done (2026-11-10): sandboxed code writes a service project's folder, so its server runs in a sidecar container per session instead of on this machine, through docker exec, with the same broker, catalog and .cs/lsp/ (Service projects). Java followed P12 the same day, JDT LS on the project's own image, Go followed P13, gopls built into the install cache by the install, and Kotlin followed once its license was accepted, the Kotlin LSP's Linux build on the glibc variant of the project's image; the route table says where every kind of problem and language stands
Not planned References, rename, and quick fixes such as adding a missing import, with the completions that add one (Revisit)

The owner set this order on 2026-11-03 (O4). Each phase is its own release, with its guide section, screenshots and website message. A server that is not a Node program (JDT LS, the Kotlin LSP, gopls, rust-analyzer) must keep the hidden directories from its server in its own way, since hide_paths.cjs reaches Node processes only: each of those phases decides how, for example a launch the server runs inside, a workspace the server sees without them, or the broker's filtering alone, and tests it with a reference in .cs/build/ before it ships.

Service projects

A service project's folder is written by code that runs in Docker, so a server on this machine must not read it: basedpyright or tsserver there would run what the folder names. ADR 0019's P9 runs the server in an lsp sidecar of its own per session, on the pinned node:24-slim image for both languages, with no network, the app's hardening and 768 MiB, and the project folder and .cs/lsp/ read-only at the paths the session names. Nothing else changes for the page or the broker but these (spec):

Item Rule
Command docker exec --interactive --workdir <project> <sidecar> before the catalog's command, in the Docker client's environment; the hidden directories are not mounted, so no variable hides them, and none would cross docker exec
initialize processId null: the sidecar cannot see cstudy serve, and both servers would exit within seconds of finding its PID gone. They stop at the end of their input, as the spike measured
TypeScript tsserver.path is the project's own node_modules/typescript/lib, so the workspace's typescript/ is not needed; the list of languages read with the attempt's id says so
Python The catalog's settings: basedpyright reads the project's [tool.pyright], whose venv the template writes, and finds the packages with no Python in the image
Definitions Into node_modules, the .venv or typeshed in .cs/lsp/: files of the bind-mounted folders, which the library tab reads on this machine at the same path
Docker not usable The socket closes with 4004 and a calm reason; a session neither starts Docker nor pulls the image

Measured on the catalog's first service projects: TypeScript's first diagnostics 1.4 s after didOpen, 386 MiB at peak; basedpyright's 0.8 s, 140 MiB at peak. The servers are the same files as on this machine, so the install does not grow; a Python learner's Docker holds the node:24-slim image besides the project's, 352 MB on disk.

Java (2026-11-10, after P12). JDT LS is a Java program whose archive holds a config_linux, so the sidecar reuses the .cs/lsp/jdtls/ that cstudy doctor --fix unpacked, mounted read-only, and runs it with the java of the project's own image (gradle:9.8.2-jdk25-alpine), which also holds the Gradle the import needs and which the install already pulled: nothing is downloaded or pulled for it. A spike on the Java fixture settled the rest:

Item Rule
Gradle's caches The install cache is mounted read-only and named to Gradle as its read-only dependency cache (GRADLE_RO_DEP_CACHE), which it neither locks nor writes; Gradle's user home and project cache go to a data folder of the sidecar's run (org.gradle.projectcachedir). With the project's .gradle/ or the install cache writable, the import's Gradle daemon would hold locks that the app's builds wait for, and a lock cannot be handed over between containers
The project folder Read-write, as the app's, with .devcontainer read-only: Gradle 9 refuses to configure a project in a folder it cannot write (can't be written to, measured with it read-only). The import wrote nothing there
Memory 2 GiB and 512 processes: JDT LS and the Gradle daemon took 1.27 GiB and 78 processes
Start Each session starts afresh, its data folder gone with its run's: the type error came 20.6 s after didOpen on a busy laptop, initialize in 5.0 s
The JDK of this machine Not used: JDT LS runs on the image's JDK 25, so a Java service project has code intelligence while this machine selects JDK 21

Go (2026-11-10, after P13). The gopls in .cs/lsp/bin/ is built for this machine, so it cannot run in the project's Linux image. Of the routes (a Linux build cross-compiled by cstudy doctor --fix with this machine's Go, which may be older than the image's 1.27; a build at session time, which would need the network) the simplest is the install's: while code_intelligence is on, the project's install, which has the network, builds gopls 0.24.0 into the install cache with the image's own Go, and its record names it. Measured: 18 to 22 s and about 54 MB of modules downloaded, of which a scratch folder that go clean empties keeps nothing, so the cache grows by the 40 MB binary. The sidecar runs on the project's image with the cache read-only and Go's build cache and gopls's file cache in its data folder: the type error 2.3 s after didOpen, 299 MiB, 93 processes (so 256 for Go). Its definitions into GOROOT and the module cache name files only the sidecar has, which the library tab cannot read. A run installs again while code intelligence is on and the record lacks gopls, so turning it on costs one install at the next run.

Kotlin (2026-11-10, once the owner accepted the license). Two routes were spiked, offline, on the catalog's coworking-availability-kotlin:

Route Result
The jars of this machine's build (263.7084.0, macOS arm64) on the project image's JDK 25, with the classpath, main class and options its product-info.json names, no disk added The JVM starts, and the server exits with status 1 before it answers initialize: UnsatisfiedLinkError: Can't load library: …/lib/filewatcher/Linux-AArch64/libfilewatcher_jni.so. Each build carries the native libraries of its platform only (its file watcher, JNA, RocksDB), and JetBrains' Linux ones are linked against glibc, which the project's Alpine image (musl, no gcompat) cannot load
JetBrains' Linux build for this machine's processor, with its own runtime and launcher, on gradle:9.8.2-jdk25, the glibc variant of the project's image (the owner chose it: "Build it first") initialize in 3.3 s, and then nothing: the project names no Gradle wrapper, so the import's Gradle tooling API (9.7.0, which the build bundles) set out to download its own Gradle from services.gradle.org and failed offline. With the layout Gradle's wrapper leaves for that version in Gradle's user home (wrapper/dists/gradle-9.7.0-bin/<base-36 MD5 of its URL>/, the .ok marker and a link from gradle-9.7.0/ to the image's /opt/gradle), the import ran on the image's Gradle 9.8.2 over the install cache, read-only, in 16 s; the type error came 25.8 s after didOpen, pulled, with Json defined in the install cache's kotlinx-serialization jar; 1.88 GiB and 114 processes. It needed no sources and no online warm-up

So cstudy doctor --fix fetches the Linux build beside this machine's, in .cs/lsp/kotlin-lsp/linux/ with its record linux.json, once a Kotlin service project is installed (its install record names its language) and the license is accepted, the same way: the newest release, its archive checked by the SHA-256 JetBrains publishes beside it. The build never runs on this machine, so it cannot say its last day: it takes that of this machine's build of the same version, which --fix fetches first, and the record also names the tooling API the build bundles, whose distribution the sidecar links to the image's Gradle. Each early-access build expires, and both expire together: when they do, --fix fetches the newest of each, this machine's and the Linux one, the doctor rows code intelligence kotlin and code intelligence kotlin service projects warn and expire together, and a Kotlin service project's session refuses an expired Linux build as the page refuses this machine's. The sidecar runs on gradle:9.8.2-jdk25, pinned by digest, which no run pulls: a session that finds it missing closes calmly with needs the Kotlin image: docker pull gradle@sha256:…. It takes 3 GiB and 512 processes, starts afresh each session (242 MB of index in its data folder), and is never warmed. What it adds: the image, 375 MB to download and 1.25 GB on disk, and the Linux build, 367.5 MB to download and 1.1 GB on disk, both only for a learner with Kotlin service projects and code intelligence on.

Consequences

  • The page's editor marks errors as you type, documents what you hover and goes to definitions in Python and TypeScript once the setting is on and cstudy doctor --fix has run online once, and completes from the server with autocomplete on; Java and, if its spike passes, Kotlin follow, then Go and Rust. Grades, runs and the files on disk are unaffected.
  • The preferences document gains code_intelligence and autocomplete, both false, and stays at format 1: parse_preferences already gives a key a stored file leaves out its default.
  • Every user loses the completion the editor offers today: with both settings at their defaults, the editor shows no completion list and no signature help. Turning on code intelligence and autocomplete brings completion back, from the server where it is ready and from the editor's language supports where it is not.
  • A new runtime dependency: wsproto 1.3.2, a pure-Python wheel that needs only h11, which uvicorn already needs; it reaches the Homebrew formula through requirements.txt with no template change (ADR 0013). The import contracts forbid wsproto wherever they forbid uvicorn.
  • A new front-end dependency: @codemirror/lsp-client 6.3.0, which brings vscode-languageserver-protocol for types only; scripts/build.ts aliases marked to the stand-in.
  • NFR-12 and test_bundle_budget.py leave out the code-intelligence chunk and hold it to its own budget.
  • The workspace's .cs/lsp/ takes about 46 MB for Python and TypeScript (a 6.7 MB download), plus 43 MB for gopls, and 52 MB for JDT LS (a 51 MB download) with 50 to 150 MB of data per Java root and session. Each running Node server takes 40 to 200 MB on practice-sized projects, gopls 240 to 350 MB with the standard library loaded, rust-analyzer about 480 MB with the sysroot loaded, a JDT LS 0.5 to 1.2 GB under its 1 GB heap, plus the Gradle daemon its first import starts when none runs (about 420 MB, idle afterwards as a build's daemon is); at most four servers run at once.
  • Kotlin, after phase 3, adds the most of any language: a 360 MB download that takes 1.1 GB in .cs/lsp/kotlin-lsp/ and about 575 MB of index per root and session, about 1.9 GB resident per session, a warm-up of about a minute in cstudy doctor --fix, and a license each user accepts, which the workspace's marker records ([licenses.kotlin-lsp]). The marker gains its first optional table; read_marker ignores it (Kotlin revisited). A learner with Kotlin service projects also gets the Linux build beside it (another 367.5 MB download, 1.1 GB on disk) and the sidecar's image gradle:9.8.2-jdk25 (375 MB to download, 1.25 GB on disk), and --fix refreshes both builds when the early-access build expires (Service projects).
  • Reference solutions stay hidden: no root holds them, a Node server cannot open .cs/build/, .cs/cases/, .cs/runs/ or the content root, and the library tab refuses them. Every later server that is not a Node program needs its own way to keep them out.
  • New code: a catalog of servers in the domain (domain/code_intelligence.py: command, initialization options, settings, idle time and root rule per language); a status and installation use case in the application, behind ports that locate and install servers and read the preference; their adapter; and the session route with its broker in entrypoints/web/, where runs already start child processes.
  • editor.ts builds its setup from basicSetup's parts, and Editor holds two diagnostic sources, includes completion only while autocomplete applies, and lets the code-intelligence chunk replace the language supports' completion in its file.
  • Specs change with the behavior: web-ui (the Editor row, Security, Preferences with both keys, the Settings view, Keyboard and accessibility with the completion and signature keys, Front-end assets, Testing), cli, installation-and-workspaces (.cs/lsp/) and architecture.
  • Found by the spike, outside this decision: rust-analyzer.check.extraArgs: ["--keep-going"] in adapters/ide/vscode.py makes rust-analyzer's cargo check fail in VS Code with current rust-analyzer, so VS Code shows no cargo check diagnostic for Rust. Removing the key is a separate fix; ADR 0010's rewriting rule then updates every .vscode/settings.json still as cstudy wrote it.

Revisit

Trigger What to reconsider
The workspace moves to TypeScript 7 Its own tsc --lsp --stdio (40 MB measured) in place of typescript-language-server, with pull diagnostics
An open-source Kotlin server reads the Kotlin the workspace pins, on the JDKs cstudy supports That server in place of the Kotlin LSP and its license
The Kotlin LSP's import gains an offline switch that needs no proxy The warm-up
JetBrains stops publishing a .sha256 file beside each Kotlin LSP archive, or GitHub starts listing the archives with a digest Where --fix reads the checksum; without one it fetches nothing
The Kotlin LSP's release notes stop linking the archives on download.jetbrains.com The pattern that finds this machine's archive (KOTLIN_LSP_RELEASES)
The Kotlin LSP ships a build that never expires The 7-day warning, which a build without a last day never shows
JDT LS gains a setting that turns its Gradle wrapper check off The empty list of Gradle versions in each data directory
Servers per tab outgrow users' memory, or JDT LS's start makes reloads slow One server per root shared by every tab, behind a broker that rewrites request ids and hands documents over
The owner asks for references, rename or quick fixes A phase where the page applies the server's edits (workspace/applyEdit), with completions that add an import
@codemirror/lsp-client resolves completion items and lets the page render documentation Its serverCompletion and signatureHelp in place of the page's own
@codemirror/lsp-client changes how it imports marked The stand-in, or rendering in the browser
ty reaches 1.0 with standard-library documentation and pyright's configuration The Python server
A browser test finds Ctrl-Minus held by an engine Another Back binding
gopls drops the oldest Go that cstudy supports The pinned table, or cstudy's Go minimum
A Python service project's starter leaves venv out of [tool.pyright] basedpyright.analysis.extraPaths with the .venv's site-packages, which the spike measured working
A service project in another language gets a template Its server in the sidecar, or in an image of its own, in place of its pending cell in the route table
JetBrains ships the Kotlin LSP's native libraries for musl, or one build for every platform Its jars on the project's own Alpine image, in place of the Linux build and the glibc image
The Kotlin LSP's import honors a Gradle home, or the Kotlin template ships a Gradle wrapper The link to the image's Gradle laid out as the tooling API's own distribution

Alternatives considered

Alternative Why rejected
codemirror-languageserver 1.23.0, or its community fork 2.0.1 Each brings its own transport and document handling; the official package does the same behind a transport interface, maintained with CodeMirror, and unpacks to 0.29 MB against 1.79 MB
Monaco with a language client ADR 0015 measured six times the raw size of CodeMirror, plus a worker
A TypeScript language service in a browser worker 8.7 MiB of compiler for one language, which cannot see the workspace's node_modules without shipping it
No language server: run checkers on save and mark their output Errors only after a save, no documentation and no definitions; Run on save with --typecheck already gives TypeScript this
Server-sent events and POSTs instead of a WebSocket A tab's language stream would take one of the six HTTP/1.1 connections per host, so two visible tabs could hold all six with their run streams; each message would be a request that must keep its order; a closed tab is noticed only at the next write
One server shared by every tab LSP has one client per server; sharing needs a broker that rewrites ids, arbitrates documents and routes server requests. At 40 to 200 MB per server, a limit of four serves practice
The workspace's pyright for Python No documentation for the standard library on hover, the owner's first request (measured)
basedpyright from PyPI in python/'s dev group It brings a 56 MB wheel holding a second Node, and changes your tracked pyproject.toml and lock
ty, or python-lsp-server ty 0.0.96 is not 1.0 yet; python-lsp-server reports no type errors without plugins
TypeScript 7's built-in server now The workspace pins TypeScript 6, so its diagnostics would come from another compiler than --typecheck, and it only answers requests for diagnostics
vtsls Version 0.3.0, built on the internals of an editor's extension; typescript-language-server is the common choice and has no dependencies
The community Kotlin language server (fwcd) Its README calls it deprecated, and its 1.3.13 exits on JDK 25 (measured)
ktlsp, its maintained fork Its Kotlin 2.2.21 compiler cannot read the workspace's Kotlin 2.4 standard library, so valid code shows errors and nothing of the library resolves (measured)
The Kotlin LSP with its import offline (com.jetbrains.ls.imports.gradle.offline) The switch needs a repository proxy of JetBrains' own setups, and the sync fails without one (measured)
The Kotlin LSP's license accepted for you, or by a setting of the page You accept a vendor's terms yourself, where you can read them: a terminal, or a flag you type
The license recorded in .cs/lsp/ .cs/lsp/ is deleted and installed again freely; the marker is the workspace's own record, kept in version control
Sources pre-fetched by a Gradle init script of cstudy's It would have to resolve exactly what the Kotlin LSP's import resolves, build scripts' libraries included; running the server's own warm-up fetches exactly that
Servers installed globally (npm -g, go install into GOPATH/bin) Changes your machine outside the workspace, with versions cstudy does not test
cstudy doctor --fix installing servers whether or not the setting is on Downloads for users who never turn it on
A new flag, cstudy doctor --fix --code-intelligence Asks you to remember a flag the preference already states; the Health view's Fix would need to pass it anyway
Hover, completion and signature Markdown rendered in the browser with marked and a sanitizer 37.6 KB raw more, a second Markdown renderer with its own rules, and a sanitizer to maintain
Completion and signature help under the one code_intelligence switch The owner made autocomplete a setting of its own: hover documents what you wrote, while completion suggests what to write, which some practice wants without
Completion only, with signature help left out or given a third setting Signature help also suggests what to write; one switch covers the help that writes with you
autocomplete set to false in storage when code intelligence turns off Turning code intelligence back on would lose the choice the user made
PUT refusing autocomplete: true while code_intelligence is false The document must hold autocomplete: true beside code_intelligence: false to keep the stored choice, so the rule belongs to the page
@codemirror/lsp-client's serverCompletion and signatureHelp They never send completionItem/resolve, so both servers' items would show without a signature or documentation (measured), and they render documentation with marked
Snippet completions Placeholders that Tab, which indents, and Vim would both have to step through; plain text inserts the name, and signature help shows the parameters
Basic completion stays on for everyone, whatever the settings say Completion is never truly off, so the setting could not give a learner practice without help (owner, O3)
Autocomplete in a later phase @codemirror/autocomplete is already in the bundle, both servers answer in milliseconds, and the page's source and tooltip are small
Cmd-click and Ctrl-click keep adding a cursor; definition on another gesture The owner asked for IntelliJ IDEA's Cmd-click
Alt-Shift-click adds a cursor only while the setting is on A click that changes meaning with a setting confuses (owner, 2026-11-03)
Refusing definitions outside the attempt, or showing them as a hover only The most frequent target in single-file practice is the standard library, whose source is what the learner wants to read
Library files opened editable They belong to installed packages and the toolchain; an edit would change every project