Repository navigation
docs: document the transport JSON (socket, transports) of a template - #1934
Conversation
Add field tables for socket and transports, say how the two relate, show transports in the example template.json, link the Transport section to the template, and say what export writes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1934 +/- ##
==========================================
+ Coverage 48.17% 48.20% +0.02%
==========================================
Files 809 809
Lines 32435 32449 +14
Branches 6600 5000 -1600
==========================================
+ Hits 15626 15641 +15
+ Misses 14314 14313 -1
Partials 2495 2495 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lagergren
left a comment
There was a problem hiding this comment.
Thank you, @muescha! I checked the new text against the code, and it holds. Approved.
Two small things, neither of them blocking:
- The
portrow says that 0 lets LSP4IJ choose a free port, which isn't so withattach. The paragraph below says it, but "(not withattach)" in the row would keep the table right on its own. - The
programArgsof the TypeScript example aren't those of the bundled template, which hassh -c typescript-language-server --stdioandcmd /C typescript-language-server.cmd --stdio. That text was there before, but the new sentence below it now presents the example as the template of that server.
…ript template's command The `port` row of the socket table now says that 0 doesn't choose a free port with `attach`, as the paragraph below it says. The `programArgs` of the example are now those of the bundled typescript-language-server template, which the sentence below the example presents it as.
|
Thanks @lagergren for making both changes right away, they're fine with me. One note on the TypeScript command, for the record: For now, keeping the example the same as the bundled template is the right call; the fix can change both together. |
Since redhat-developer/lsp4ij#1870, a template can set a socket transport (
socket) and list the transports its language server supports (transports), both experimental. The docs described the dialog, but the JSON side was thin. Came up while reviewing redhat-developer/lsp4ij#1926.Changes
docs/UserDefinedLanguageServerTemplate.mdsocketandtransportsare optional, in the list of the descriptor and in their sections.template.json(typescript-language-server) now has itstransports, as the bundled template does, and a sentence below it says why it has nosocket.#### Socket: a field table (mode,host,port, with defaults). Adds thatstdiois the same as nosocket, thathostis used byattachonly, thatattachneeds a port, and that a missingmodeis also a warning.#### Transports: a field table (moderequired,argumentoptional). Adds that an entry with a missing or unknownmodeis skipped with a warning, that withoutargumentthe hint names only the mode, and that the hint uses the first socket mode of the list.#### Socket and transports:socketis what the dialog preselects and what export keeps;transportsonly changes what the dialog offers and hints; LSP4IJ doesn't check one against the other.docs/UserDefinedLanguageServer.md#### Transport: one sentence that a template sets this withsocketand lists the supported ones withtransports, linking to the template sections.### Exporting templates: export writessocket(mode,port, andhostwhen set) and nevertransports.Every statement was checked against
main:LanguageServerTemplateDeserializer(deserializeTransport,port,deserializeSupportedTransports),LanguageServerDefinitionSerializer,UserDefinedTransport,UserDefinedLanguageServerDefinition.createConnectionProvider,TransportFields(getTransport,update,validate),NewLanguageServerDialog.loadFromTemplateandLanguageServerBundle.properties. No code changes.Question for the review
Minimal or full example? The first example
template.json(typescript-language-server) keeps itstransportswith onlystdio, as the bundled template has, and nosocket; a sentence below it says why. Would a minimal example (notransports, nosocket), with each optional property explained in its own section, read better? Or a full example that showssocketandtransportstogether, for a language server which supports a socket?🤖 Generated with Claude Code