From 778a979714f8eecbbe47953be8b23b6f2fe5a752 Mon Sep 17 00:00:00 2001 From: Luoyayu Date: Sat, 7 Dec 2024 07:36:14 +0000 Subject: [PATCH] lsp: Fix format of JSON-RPC content part ending with \r\n --- blueprintcompiler/lsp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprintcompiler/lsp.py b/blueprintcompiler/lsp.py index 25b289f..0659154 100644 --- a/blueprintcompiler/lsp.py +++ b/blueprintcompiler/lsp.py @@ -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}"