Repository navigation
Description
A follow-up of #1870, collected in #1943.
The template's transports only apply in the New Language Server dialog
loadFromTemplate is the only caller of setSupportedTransports.On the settings page of a server made from the TypeScript template, Socket can be chosen, and the hint is missing. (done in #1962: the settings page applies the template's transports too)
The settings page already looks up the template by its id for the URL, so the same lookup could pass its (done in #1962)transports to the panel. An imported template has no id there, so it would have to store its transports in the settings; I'd leave that out for now.
But I wouldn't lock Socket there, and maybe not in the dialog either. A template is also a starting point: someone with their own TypeScript language server that does talk over a socket would take the TypeScript template for its mappings and settings, change the command, and then can't choose Socket, because the template says stdio only. Today they can only switch it on the settings page afterwards, since the lock is missing there; with the lookup above, that way would close too.
Some ways to keep the help without the lock:
- A warning instead of the lock: Socket stays enabled, the grey hint stays as it is, and once Socket is chosen it becomes a warning ("The template says this language server talks LSP only over its standard input and output"), e.g. as
ValidationInfo.asWarning().withOKEnabled(), so OK and Apply still work. - An override link in the hint: "This language server talks LSP only over its standard input and output. Use a socket anyway", which enables Socket for this server.
- Lock only while the command is the template's: once the command is changed, it's no longer the template's server, so the template's
transportsno longer apply, and Socket is enabled with the hint. - Let the hint say where it comes from: "The TypeScript Language Server template lists only stdio", so it reads as advice about that server, not as a limit of LSP4IJ.
I'd go for the warning, maybe together with the command check, and the same on the settings page. That also covers the next section the other way round.
A language server that talks only over a socket
The template can say that a server only supports a socket, by listing only socket modes in transports, but nothing uses that:
stdiois never disabled, onlysocketis (inupdate()), and there's no hint like "This language server talks LSP only over a socket";- without a
socketobject as well, the dialog selects stdio for it; forInstalledCommandswitches such a server to stdio when its installer's command has no${port}, so it can't start at all afterwards.
A hint, and a warning when stdio is chosen, in the same way as in the previous section, and not falling back to stdio for such a server, would cover it. (Not tested with a real socket-only server, only read in the code.)
transports isn't exported
transports lives only in LanguageServerTemplate, not in the definition or its settings. Export writes socket, but never transports. A server created from an exported template therefore allows every transport again, and the lock or hint from the original template is gone. This is the same gap as on the settings page above: once transports is kept with the server, both the settings page and export could use it.
socket and transports aren't checked against each other (done in #1981)
socket and transports aren't checked against each other (done in #1981)loadFromTemplate calls setTransport before setSupportedTransports, and nothing compares the two. With a socket mode and transports listing only stdio, Socket is preselected but disabled. Once the user switches to stdio, they can't go back, and no warning says why. With the warning suggested above instead of the lock, this case would also read better. Otherwise the template loader could warn that the socket mode isn't in transports.
The hint uses only the first socket mode of transports
The hint below the socket modes takes the first entry that isn't stdio. A server that lists both startAndConnect and startAndAccept only shows the first. Is that intended, or should the hint name every listed socket mode?
A transports entry without mode (done in #1981)
transports entry without modeAn entry without (done in #1981)mode is reported as "The template lists the unknown transport mode null, which is ignored". For socket, a missing mode has a message of its own. The same for transports ("A transport of the template has no mode, …") would read better.
How this was checked
The lock on Socket after Import template... was seen in runIde; the rest Claude Code found by reading the code, without trying it in the IDE: the first two sections at b4b23c2, the last four at 754254a.
Activity
feat: the socket transport of a language server is no longer experime…
feat: the socket transport of a language server is no longer experime…
fix: small template and installer bugs from #1959, #1960, #1961 and #…
lagergren commentedon Nov 13, 2026
Where 0.30.0 stands on these:
transportstoo. With fix: swap the argument of a transport only when the user changes the transport #1969, changing the transport there or in the dialog swaps the template's argument in the command, as--stdiofor--socket=${port}. Socket is still locked for a server whose template lists only stdio, so the warning or override is still open.socketandtransportschecked against each other: fix: small template and installer bugs from #1959, #1960, #1961 and #1947 #1981 reports a template whosesocketmode isn't one of itstransports. fix: swap the argument of a transport only when the user changes the transport #1969 keeps a socket mode chosen already, as in saved settings, when the template's transports are loaded.mode: fix: small template and installer bugs from #1959, #1960, #1961 and #1947 #1981 reports it as "A transport of the template has no mode, so it is ignored".fix: warn, instead of locking Socket, for a language server whose tem…
lagergren commentedon Nov 23, 2026
Progress: #2087, merged on 2026-11-23 for 0.30.2, replaces the lock with the warning suggested above. For a template whose
transportslists onlystdio:Still open here:
forInstalledCommandstill falls back to stdio.transportsisn't exported.transports.fix: select Socket, with a hint, and warn of stdio, for a language se…
fix: an installer no longer switches a language server whose template…
fix: show a hint for every socket mode which a template lists, not on…
fix: an exported language server keeps the transports of its template (…
fix: select Socket, with a hint, and warn of stdio, for a language se…
fix: an installer no longer switches a language server whose template…
fix: show a hint for every socket mode which a template lists, not on…
fix: select Socket, with a hint, and warn of stdio, for a language se…
fix: an installer no longer switches a language server whose template…
fix: show a hint for every socket mode which a template lists, not on…
lagergren commentedon Nov 23, 2026
All the sections of this issue are done now, for 0.30.2:
transportsonly apply in the New Language Server dialogstdio; choosing it gives a warning that keeps OK and Apply enabled${port}no longer switches such a server to stdiotransportsisn't exportedtransportsof the bundled template that the server was created fromsocketandtransportsaren't checked against each othertransportsentry withoutmodeTwo things remain, outside these sections:
transportshint, and its own export has notransports. That would needtransportsin the settings of the language server; fix: an exported language server keeps the transports of its template #2131 leaves it out.Thanks for the thorough write-up. Every section of it was right.