vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.87k stars 405 forks source link

Ever since vscode update my component hilighting is broken #4156

Open maxwellsmart84 opened 8 months ago

maxwellsmart84 commented 8 months ago
image

^^ Using Monokai, all Vue components are now green making it very difficult to read.

YcZzy commented 8 months ago

the same problem as you just install the old version

maxwellsmart84 commented 8 months ago

@YcZzy old version of VSCode or Volar?

maxwellsmart84 commented 8 months ago

Downgrade to 2.6 did fix it for me.

image
davidmatter commented 8 months ago

This is not a bug, it's just semantic highlighting working properly. You can remove it in the settings

image
Laurelin commented 8 months ago

This is not semantic highlighting working properly; it doesn't recognize components at all. have to revert to 1.8.27 to fix it. Big problem, because it doesn't know what props my components need, makes breaking things inevitable.

CyberCowboy404 commented 7 months ago

I've noticed that my highlight broke after I run code formatting. After formatting my script section becomes like this

<script
  setup
  lang='ts'
>

This is annoying behavior which I also got after update. i suppose it may cause such problem

mattmess1221 commented 7 months ago

The highlighting isn't completely broken for me using Dark Modern theme, but it does blink in and out sometimes as I scroll. Specifically, I've seen that if I start to scroll past about 50 lines of <template> code, the highlighting breaks.

qiaozhu commented 7 months ago

切换折叠、滚动条滚动等情况下,组件高亮会闪烁

XioDone commented 7 months ago

@johnsoncodehk Is it possible to refer to #2252 to fix it?

image
johnsoncodehk commented 7 months ago

@XioDone No, with TS plugin it can't use "component" semantic token type.

DocMcCoy commented 7 months ago

I've been annoyed with this for a minute but while I was messing around I noticed highlighting changing as I changed the lang attribute.

Screenshot 2024-04-16 at 4 08 50 PM Screenshot 2024-04-16 at 4 10 34 PM

js doesn't seem to be the lang that you would want there however. Also interesting is that in both scenarios the built-in TransitionGroup component is highlighted as expected.

amfischer commented 4 months ago

No, with TS plugin it can't use "component" semantic token type.

@johnsoncodehk Does this mean custom components should have the same highlight color as normal html tags?

I've been annoyed with this for a minute but while I was messing around I noticed highlighting changing as I changed the lang attribute.

@DocMcCoy interesting, adding lang="js to my template tag does correct the highlighting but causes eslint to throw errors in my <script> section.

so1ve commented 4 months ago

@amfischer Internally components are converted to functions. So they should have the same color as functions

amateuz commented 1 month ago

Faced this issue. Rather annoying for me. @amfischer Same here. Adding lang="js" to my template fixes the issue but eslint starts to throw errors.