visual studio code - How to customize font color in the error panel of VSCode - Stack Overflow

admin2025-05-01  2

How can I customize or change the font color displayed in the editor, such as those shown by linters or code analysis tools?

I want to customize the font color for

Undefined name `abc` Ruff(F821)
"abc" is not defined Pylance(reportUndefinedVariable)

How can I customize or change the font color displayed in the editor, such as those shown by linters or code analysis tools?

I want to customize the font color for

Undefined name `abc` Ruff(F821)
"abc" is not defined Pylance(reportUndefinedVariable)
Share Improve this question edited Jan 6 at 6:59 vimchun 4311 silver badge11 bronze badges asked Jan 2 at 22:20 Michael XiaMichael Xia 614 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 3

Open settings.json (Open Preferences > Settings > Workbench: Color Customizations)

Then modify the workbench.colorCustomizations block to include the editorHoverWidget.foreground key so it looks something like this:

...

"workbench.colorCustomizations": {
    "editorHoverWidget.foreground": "#00ff00",
},

...

(or replace with whichever color you want)

If this worked for you, please accept the answer

On settings.json, set the following to have this :

{
    "workbench.colorCustomizations": {
        "[One Dark Pro]": {   // your theme name
            "editorHoverWidget.foreground":"#ffff00",  
            "textLink.foreground": "#00ffff",  
            "editorHoverWidget.statusBarBackground":"#008800"   // as a bonus
        }
    }
}
转载请注明原文地址:http://anycun.com/QandA/1746094332a91584.html