I tried using the built-in tsgo client (typescript-go, @typescript/native-preview). It's a strict JSON decoder and rejects two things lsp-mode sends, so it never initializes.
First, the client capabilities contain (inlineCompletion . ()) in lsp-mode.el, which serializes as "inlineCompletion": null. The spec says that field is an optional object, so it should either be omitted or be an object. tsgo errors with:
InvalidParams: ... within "/capabilities/textDocument/inlineCompletion": null value is not allowed
Second, paramless requests like shutdown go out as "params": null, because lsp--make-notification always includes :params. JSON-RPC says params must be omitted or structured, so tsgo errors on restart too:
InvalidParams: expected empty, got: null
Both seem like one-line fixes: serialize inlineCompletion as an empty object (like the neighboring entries), and drop :params from the message when nil.
I'm working around both locally with advice, happy to send a PR if you'd take one. Related: #4854.
Tested with lsp-mode master and tsgo 7.0.0-dev.20260609.1.
I tried using the built-in tsgo client (typescript-go,
@typescript/native-preview). It's a strict JSON decoder and rejects two things lsp-mode sends, so it never initializes.First, the client capabilities contain
(inlineCompletion . ())in lsp-mode.el, which serializes as"inlineCompletion": null. The spec says that field is an optional object, so it should either be omitted or be an object. tsgo errors with:Second, paramless requests like shutdown go out as
"params": null, becauselsp--make-notificationalways includes:params. JSON-RPC says params must be omitted or structured, so tsgo errors on restart too:Both seem like one-line fixes: serialize
inlineCompletionas an empty object (like the neighboring entries), and drop:paramsfrom the message when nil.I'm working around both locally with advice, happy to send a PR if you'd take one. Related: #4854.
Tested with lsp-mode master and tsgo 7.0.0-dev.20260609.1.