Compare commits

...

2 commits

Author SHA1 Message Date
Luoyayu
92fa6692d5 Merge branch 'fix-lsp-content-part-format' into 'main'
lsp: Fix format of JSON-RPC content part ending with \r\n

See merge request jwestman/blueprint-compiler!221
2024-12-07 07:38:25 +00:00
Luoyayu
22e285dbe8 lsp: Fix format of JSON-RPC content part ending with \r\n 2024-12-07 07:36:14 +00:00

View file

@ -149,7 +149,7 @@ class LanguageServer:
def _send(self, data):
data["jsonrpc"] = "2.0"
line = json.dumps(data, separators=(",", ":")) + "\r\n"
line = json.dumps(data, separators=(",", ":"))
printerr("output: " + line)
sys.stdout.write(
f"Content-Length: {len(line.encode())}\r\nContent-Type: application/vscode-jsonrpc; charset=utf-8\r\n\r\n{line}"