Skip to content

Fix external file watching and add reload command (fixes #8)#10

Open
maxeonyx wants to merge 4 commits into
mainfrom
MC-8-fix-external-file-watching
Open

Fix external file watching and add reload command (fixes #8)#10
maxeonyx wants to merge 4 commits into
mainfrom
MC-8-fix-external-file-watching

Conversation

@maxeonyx

@maxeonyx maxeonyx commented Apr 9, 2026

Copy link
Copy Markdown
Owner

Problem

Out-of-workspace replacement files (configured via replacementsFiles) are loaded once at activation but never refreshed. vscode.workspace.createFileSystemWatcher only fires events for files inside a workspace folder, so changes to external config files (e.g. in dotfiles or home directories) are silently ignored until the user reloads the entire window.

Solution

  • Add Node.js fs.watch() fallback for replacement files that resolve outside any workspace folder
  • Add a Reload Replacement Files command for manual refresh
  • Keep existing createFileSystemWatcher for in-workspace files (it works correctly there)

Fixes #8

@maxeonyx maxeonyx marked this pull request as ready for review April 9, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saving configuration in replacementsFiles config file doesn't refresh extension cache

1 participant