Closed janisdd closed 9 months ago
Here are some insights I've gained along the way:
vs code version: 1.86.1
FileSystemWatcher
works on all files (e.g. outside of workspace)
FileSystemWatcher
is fired can vary from os to osFileSystemWatcher
event is fired, it is not guaranteed that we will receive the up-to-date file content (via workspace.openTextDocument
)because FileSystemWatcher
does not ensure the latest file content, we use workspace.onDidChangeTextDocument
workspace.onDidChangeTextDocument
ensures the latest file contentonDidChangeTextDocument
workspace.openTextDocument
is called, onDidChangeTextDocument
works normally againso we combine both things and trigger a change when one of the events (FileSystemWatcher
or onDidChangeTextDocument
) occurs
Fixed in v0.9.0
Version?
Feature
In the current release notes of vs code https://code.visualstudio.com/updates/v1_62#_file-watching-changes they mentioned that they are transitioning to a new file watcher... If I remember correctly we can only watch files in the workspace currently (and reload the table if the csv file changes). Maybe with the new file watchers we can also watch files outside of the current workspace (e.g. if you just drop a file in vs code outside of the currently open project)?