-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use vscode watches for tsserver #193848
Use vscode watches for tsserver #193848
Conversation
🆒 , is this the change that would enable file watching in all of TS extension with the VS Code file watcher or is there more needed? |
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
Yes microsoft/TypeScript#54662 should redirect all the watch calls by tsserver into vscode if invoked with |
Fyi #194776 landed which enables extensions to do full recursive file watching anywhere even within the workspace with custom exclude rules. It is behind proposed API ( |
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
@sheetalkamat I pushed a change that gates this feature behind a setting and also tries to clean up file watchers when the server restarts In my testing, I see errors such as this in the developer tools:
Will this cause any issues for TypeScript? It seems like we may be trying to watch the contents of a directory that does not exist. Will we still pick up if the directory is created later? |
We do need to watch even if directory does not exist and get events when it gets created. (Without this we wouldnt be picking up changes to project resolutions because of |
@sheetalkamat no, that is not supported. you have to watch a parent folder that exists. Maybe then you will have to watch the workspace folder(s) and do a negated exclude pattern such as |
Works with microsoft/TypeScript#54662