From d681cc701c673744f3b620e937ebdf41dbb26d13 Mon Sep 17 00:00:00 2001 From: David Macek Date: Wed, 17 Jan 2024 17:25:54 +0100 Subject: [PATCH] Resolve config for the active file ... not for the workspace directory. Passing a directory to resolveConfig was broken in prettier v3.1.1, as reported here: https://github.com/prettier/prettier/issues/15879 --- CHANGELOG.md | 3 ++- src/PrettierEditService.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c556be9..9af2cebbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ All notable changes to the "prettier-vscode" extension will be documented in thi ## [Unreleased] -Fixed the issue where VSCode was misrecognizing the path in output panel due to added quotes. +- Fixed the issue where VSCode was misrecognizing the path in output panel due to added quotes. +- Fixed config resolution that caused plugins to be ignored when using Prettier 3.1.1 or later. (#3252) ## [10.1.0] diff --git a/src/PrettierEditService.ts b/src/PrettierEditService.ts index 963ae5c64..6e40db601 100644 --- a/src/PrettierEditService.ts +++ b/src/PrettierEditService.ts @@ -197,7 +197,7 @@ export default class PrettierEditService implements Disposable { const selectors = await this.getSelectors( prettierInstance, - workspaceFolder.uri + document.uri ); if (!isRegistered) {