Closed aleksandar-radev closed 2 weeks ago
What theme are you using? By calling the editor.action.inspectTMScopes
command on the component name, it can be seen that the semantic token type is correctly emitted, but some themes do not handle it.
@KazariEX here's an example output from the editor.action.inspectTMScopes
command:
I've tried many themes, none making any difference. I am using the default Dark+ theme
It seems semantic token is not working, @KazariEX do you know if vscode can turn server capabilities off in someway ( I did not found)? But the vue language server it self should have no issue since you had it work in another server.
Can you also confirm the configuration for both server are the same, e.g. set editor.semanticHighlighting.enabled
to false will disable semantic highlighting. Not sure if vscode has other settings may effect it.
editor.semanticHighlighting.enabled is set to configuredByTheme on both sides.
What is interesting, is that it just broke when using a local repository. The only change I might have done is to change the version of the vue extension back and forth to earlier and newer versions.
uninstalling and installing again doesn't help. settings have not been changed since. I am thinking it might be something cache related, but I have tried deleting it:
C:\Users\
is there any other related cache that is to be deleted?
Try setting it to true
?
yes, tried that :/ but, same.
uninstalling and installing again doesn't help. settings have not been changed since. I am thinking it might be something cache related, but I have tried deleting it: C:\Users
\AppData\Roaming\Code\CachedData
The cache should on server not your window local, and I dont really feel it's a cache thing. Based on what you have done, it's really became some kind of mysterious since you mentioned it works in another server and the types are correctly inferred . Two last thing probably worth to try:
node_modules
and re-installvite create
see if it has the same issue.removing and re-installing node_modules did not help, but I found that it is related to either the packages I am using (the dependencies) or to yarn.
creating a new project did have the colors correctly, then replacing the package.json with the old one that I am currently using caused the issue.
Seems there is a problem with yarn v4+ ? (installing with npm was OK)
I will investigate further and will comment again.
removing both node_modules and lockfile, and re-installing seems to have solved the issue.(removing either one separately didn't have effect). Works with all npm, yarn 1.22 and yarn v4.
Closing as solved. thanks @RayGuo-ergou @KazariEX
Vue - Official extension or vue-tsc version
Vue - Official extension version 2.1.6
VSCode version
1.93.1
Vue version
3.4.21
TypeScript version
~5.4.0
System Info
package.json dependencies
Steps to reproduce
Installing the newest extension version (2.1.6) breaks the coloration of the components and they are shown like normal html tags in the template. Rolling back to version 1.8.27 fixes the issue.
I am connecting to a remote sandboxed server via the remote-ssh extension.
No related errors in the vscode developer tools nor on the output channel for the extension.
What is expected?
I am expecting the newest version to work as expected, recognizing the components and adding a different color from the other html tags. (when hovering, components are indeed recognized and their definition is shown, but the coloration is not applied)
What is actually happening?
Updating to the newest version or any version 2+ breaks the coloration of vue components (but still recognizes them)
Link to minimal reproduction
No response
Any additional comments?
I have tried deleting cache on both the remote server and locally tried different typescript versions tried uninstalling all extensions and installing only the Vue official extension. (nothing changed) tried rebooting my server
What is interesting, is that opening the same vuejs project on another remote server the same way, did not have the same issue.
I am not sure what could even be causing this issue.