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
Add a "Volar: Reload Project" command #1605
Comments
We have this command and it title is "Volar: Restart Vue server", but we can change the title to "Volar: Reload Project" if it more meaningful. |
The TypeScript plugin has both a restart and reload commands are they the same underneth? |
It seems "TypeScript: Reload Project" is subset of "TypeScript: Restart TS server" and faster than it. But I'm not sure if implement "Reload Project" in Volar is meaningful if only it's just faster. |
Mostly I suggested this due to ts-server still having trouble nowadays with keeping it's status up-to-date often prompting me to having to reload/restart it and in takeover mode it is Volar that takes the responsibility of running it. |
I wonder how much is a limitation in TS itself or caused by Volar. In my project, we have a watcher tool that generates and updates TS files in the background, based on our server-side code. Basically, think of generating your client code to call the server web API. This is a constant source of "Volar: Restart Vue Server" and that's super annoying and flow-breaking. Here's an example of what happens:
This is in the same project, same VS Code session. So it looks like plain TS is a little better than Volar at picking file changes. |
TS 4.8 might include improvements to the buggy file watcher behavior BTW. |
@jods4 Volar doesn't implement file watch by itself, but delegates to LSP events (same as Vetur), so you should be able to reproduce the same problem in Vetur. |
v0.39.3 "Volar: Reload Project" command cannot detect node_modules change, will fix in v0.39.4. |
@johnsoncodehk I have not tested with Vetur, it may not work either. So somehow the TS language server on its own seems to do fine. Volar must be doing something differently that leads to missed file changes. If there's anything that I can provide to help to find the difference, maybe like logs, just let me know. |
@jods4 VSCode provide language support for .ts via tsserver, tsserver implement it own file watch logic but not use LSP file watcher. I think every LSP language extension should have same problem, you should port this problem to VSCode repo. |
Current limitations in ts-server file watching can often lead to a need to either restart the server or reload the project. Reloading the project can often be faster than a full restart but is not exposed in Volar unlike in the builtin TypeScript extension.
The text was updated successfully, but these errors were encountered: