如何禁用VS Code中的错误突出显示?
我需要在VS Code中禁用Java文件中的错误突出显示.VS Code认为它是Java文件时,尝试检查Groovy文件.
I need to disable error highlighting in Java files in VS Code. VS Code tries to check a Groovy file while thinking it is a Java file.
如您在图片中所见,第一个字段之后的所有导入和第一个字段之后的类型都突出显示为红色(由于缺少分号).但是,我不希望对此Groovy文件进行错误检查.
As you can see in the picture all imports after the first and the types after the first field are highlighted red (due to missing semicolons). However I do not want the error check for this Groovy file.
注意:我只安装了插件Clang,RedHat.Java,Markdown PDF,Sort Lines和Uncrustify.即使我禁用了所有红色突出显示,也可以看到.
NOTE: I only have the plugins Clang, RedHat.Java, Markdown PDF, Sort Lines, and Uncrustify installed. Even if I disable all the red highlighting is visible.
打开您的偏好设置文件并添加
open your preferences file and add this
"java.validate.enable": false
我没有为Java尝试过,但它适用于打字稿.
I didn't try it for java, but it works for typescript.