From 43d28cc0c1b22c4bef81532e0764c13a39568759 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 28 Nov 2023 18:56:16 +0200 Subject: [PATCH] Ignore `initialized` LSP request in prettier wrapper --- crates/prettier/src/prettier_server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/prettier/src/prettier_server.js b/crates/prettier/src/prettier_server.js index 191431da0b..bf62e538dd 100644 --- a/crates/prettier/src/prettier_server.js +++ b/crates/prettier/src/prettier_server.js @@ -153,7 +153,10 @@ async function handleMessage(message, prettier) { const { method, id, params } = message; if (method === undefined) { throw new Error(`Message method is undefined: ${JSON.stringify(message)}`); + } else if (method == "initialized") { + return; } + if (id === undefined) { throw new Error(`Message id is undefined: ${JSON.stringify(message)}`); }