Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get rid of this golden yellow color on files and directory #3957

Open
aaravmer opened this issue Feb 21, 2025 · 2 comments
Open

How to get rid of this golden yellow color on files and directory #3957

aaravmer opened this issue Feb 21, 2025 · 2 comments
Labels

Comments

@aaravmer
Copy link

It is colored when there are unused imports, unused variables or any other warning in file. I don't want them to get colored.

Image
@aaravmer
Copy link
Author

I tried putting "problems.decorations.enabled": false but it disabled red coloring of file which had errors, which I do not want to disable.

@rgrunber
Copy link
Member

Have a look at https://github.com/eclipse-jdtls/eclipse.jdt.ls/wiki/Language-Server-Settings-&-Capabilities#java-compiler-options .There are a list of various compiler options (including various types of issues that can be set to error/warning/info/ignore. From what you've mentioned, you would want to set at least the following :

.vscode/settings.json

{
  "java.settings.url": ".vscode/settings.prefs",
}

.vscode/settings.prefs

org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore

There might be more to disable.

On the other hand if you just want to outright ignore all errors/warnings on a file, we have :

"java.diagnostic.filter": [ "**/Foo.java" ] which would ignore all errors/warning on any source file named Foo.java. See https://github.com/redhat-developer/vscode-java?tab=readme-ov-file#supported-vs-code-settings for more info on the various settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants