-
-
Notifications
You must be signed in to change notification settings - Fork 510
Closed
Labels
triage-pendingAwaiting initial triageAwaiting initial triage
Description
Problem
The extension watches for changes to Prettier config files (.prettierrc*, prettier.config.*, .editorconfig) and clears the config cache when they change. However, .prettierignore is not included in this watch list.
When a user modifies .prettierignore, the extension may continue using stale ignore data until VS Code is reloaded.
Proposed Solution
Add a file system watcher for .prettierignore that triggers cache invalidation.
Location
src/PrettierEditService.ts - alongside existing config file watchers (lines 131-175)
Implementation
// Add to the config file watchers in registerDocumentFormatEditorProviders()
const ignoreWatcher = workspace.createFileSystemWatcher("**/.prettierignore");
ignoreWatcher.onDidChange(this.prettierConfigChanged, this);
ignoreWatcher.onDidCreate(this.prettierConfigChanged, this);
ignoreWatcher.onDidDelete(this.prettierConfigChanged, this);
this.disposables.push(ignoreWatcher);Impact
- User Experience: Changes to
.prettierignoretake effect immediately - CLI Parity: CLI always reads fresh ignore data; extension should too
- Effort: Low - small addition to existing watcher setup
Relevant Files
src/PrettierEditService.ts- file watcher registration
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triage-pendingAwaiting initial triageAwaiting initial triage