You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dynamic registration of watchedFiles does not respect files outside workspace #1783
Opening the project with code /home/project
My extension has a setting where I can define the path for the watched file.
Example: my-extenion.watchingFiles: "/home/outside-project/watched-file.txt"
Issue
My LSP Server tells VS Code to watch for the file outside its project:
But VS Code does never send a workspace/didChangeWatchedFiles notification to the server, when editing the file.
When watched-file.txt is inside /home/project/ it works as expected with the absolute path.
Activity
DavyLandman commentedon Jun 17, 2026
Looks like for out of workspace watches you have to use a relative pattern: https://code.visualstudio.com/api/references/vscode-api#workspace.createFileSystemWatcher (see the "Out of workspace file watching" section in examples).
Maybe an interesting issue to raise in the VS Code repo that it won't detect the file path is outside the repo and rewrite that internally?