Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Allow Prettier to read the .editorconfig files of the project when formatting from within Zed (#59149)

Matt Harrison8589cbbf6bd0
diff --git a/crates/prettier/src/prettier_server.js b/crates/prettier/src/prettier_server.js
index 917095fea68..37a216f8c96 100644
--- a/crates/prettier/src/prettier_server.js
+++ b/crates/prettier/src/prettier_server.js
@@ -172,7 +172,7 @@ async function handleMessage(message, prettier) {
let resolvedConfig = {};
if (params.options.filepath) {
- resolvedConfig = (await prettier.prettier.resolveConfig(params.options.filepath)) || {};
+ resolvedConfig = (await prettier.prettier.resolveConfig(params.options.filepath, { editorconfig: true })) || {};
if (params.options.ignorePath) {
const fileInfo = await prettier.prettier.getFileInfo(params.options.filepath, {