-
-
Notifications
You must be signed in to change notification settings - Fork 416
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
[takeover] Change in one ts file does not reflect diagnostics in another file #3229
Comments
I'm also able to reproduce it with another Volar-based LS, unrelated to Vue. It does not require takeover mode. I haven't published its source yet, but the gist of the LS is: https://gist.github.com/lucasavila00/e7b8014c0d2aec6a8082f2f5b578578d Basically if one adds embedded TS documents to volar starter https://github.com/volarjs/starter this bug is reproduceable. |
What is your language server For |
@lucasavila00 volarjs/starter used |
It was actually set to |
And BTW. According to the LSP spec the pull diagnostics also support notifying about changes in related documents which means that the server can notify about updated diagnostics even in the not-currently-active document. (whether it would be possible to handle with typescript or the current volar architecture, I can't tell) |
Also note: I'm testing in ST which does support |
I think it's expected that You can change it to |
According to the description of LSP refresh diagnostics it doesn't seem to be for individual files, I think the language client needs to handle the refresh itself with re-pull diagnostics. |
No. The error gets eventually reported, even in Volar. The issue is that the file needs to be explicitly modified (by adding a space or whatever other change) and then Volar correctly picks up the updated diagnostic.
Not sure what you mean. |
I'm not sure if this affects only takeover mode (ts/js files) or also Vue files but I would suspect that it does affect all.
file1.ts
file2.ts
1
in the first file to'str'
.Expected:
file2
shows an error because number and string can't be added.Actual:
file2
does not show any error until something is changed in the file.It doesn't seem like Volar listens to the tsserver events (
syntaxDiag
,semanticDiag
) that update diagnostics.The text was updated successfully, but these errors were encountered: