vuejs / language-tools

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

新版vscode导致less deep语法解析奔溃 #3911

Open meesii opened 8 months ago

meesii commented 8 months ago

image

image

如上图style标签直接解析奔溃了,如果注释掉deep这行就正常了。

上图为最新版vscode v1.87,包括vscode.dev在线版本也是一样。 降级到v1.85就显示正常了,如下图。 Vue Language Features (Volar) vv1.8.27

image

meesii commented 8 months ago

具体说是从vscode v1.86 开始的,v1.85就没有这个问题。 虽然表面上只是语法解析失败了,但是保存文件的时候会跳动,默认展开了所有代码。

meesii commented 8 months ago

@so1ve 麻烦帮忙看一下,在线的 https://vscode.dev/ 直接就可以复现问题。

so1ve commented 8 months ago

What kind of crash?

meesii commented 8 months ago

What kind of crash?

Please look at the tag in the first picture. The color is abnormal.

meesii commented 8 months ago

Once this problem occurs, when I save the file, vscode will automatically expand all codes, causing my cursor position to change.

so1ve commented 8 months ago

Could you please explain expand?

meesii commented 8 months ago

If I'm currently editing line 10 of code, the cursor may appear on any line when I save. Because vscode expanded all my folded code.

Sunxinqiang commented 6 months ago

Have the same problem. Deep grammar color highlight error. It will influence all below it. When i write style tag at top use :deep() function, all my code highlight error.

Right highlight

image

Error highlight

image
FoundTheWOUT commented 5 months ago

1.86 vsc 把 less grammar 换了,不知道怎么搞的。。 https://stackoverflow.com/questions/77984498/vs-code-1-86-less-syntax-highlighting-not-correct https://github.com/microsoft/vscode/issues/171239

临时解决方案是安装一个另外的 less 高亮插件(或者自己替换),覆盖内置的 grammar 我找了一个 language-less 你也可以看看有没有别的可用的