language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Ever since vscode update my component hilighting is broken

Open maxwellsmart84 opened this issue 1 year ago • 15 comments

image

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

maxwellsmart84 avatar Mar 25 '24 14:03 maxwellsmart84

the same problem as you just install the old version

YcZzy avatar Mar 26 '24 03:03 YcZzy

@YcZzy old version of VSCode or Volar?

maxwellsmart84 avatar Mar 26 '24 16:03 maxwellsmart84

Downgrade to 2.6 did fix it for me.

image

maxwellsmart84 avatar Mar 26 '24 21:03 maxwellsmart84

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

davidmatter avatar Mar 27 '24 14:03 davidmatter

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.

Laurelin avatar Mar 27 '24 14:03 Laurelin

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

CyberCowboy404 avatar Mar 29 '24 16:03 CyberCowboy404

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.

mattmess1221 avatar Apr 02 '24 17:04 mattmess1221

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

qiaozhu avatar Apr 08 '24 10:04 qiaozhu

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

XioDone avatar Apr 12 '24 15:04 XioDone

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

johnsoncodehk avatar Apr 12 '24 16:04 johnsoncodehk

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.

DocMcCoy avatar Apr 16 '24 22:04 DocMcCoy

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.

amfischer avatar Jul 11 '24 20:07 amfischer

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

so1ve avatar Jul 12 '24 06:07 so1ve