diff --git a/crates/prettier/src/prettier_server.js b/crates/prettier/src/prettier_server.js index bf62e538dd..ebe2303777 100644 --- a/crates/prettier/src/prettier_server.js +++ b/crates/prettier/src/prettier_server.js @@ -173,12 +173,16 @@ async function handleMessage(message, prettier) { if (params.options.filepath !== undefined) { resolvedConfig = (await prettier.prettier.resolveConfig(params.options.filepath)) || {}; } + + const plugins = Array.isArray(resolvedConfig?.plugins) && resolvedConfig.plugins.length > 0 ? + resolvedConfig.plugins : + params.options.plugins; const options = { ...(params.options.prettierOptions || prettier.config), ...resolvedConfig, + plugins, parser: params.options.parser, - plugins: params.options.plugins, path: params.options.filepath, }; process.stderr.write(