如何禁用VS Code中的错误突出显示? [英] How to disable error highlighting in VS Code?

查看:111
本文介绍了如何禁用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.

这篇关于如何禁用VS Code中的错误突出显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆