36

enter image description here

How do I disable the underlining of variables and their methods, like shown above? I find it quite distracting.

I don't think this is a duplicate of Disable wavy underline in VS Code because it's not a wavy underline.

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
nz_21
  • 6,140
  • 7
  • 34
  • 80

2 Answers2

53

The underline is intended to draw attention to mutable variables and methods. It can be disabled by adding the following to your settings.json:

{
    "editor.semanticTokenColorCustomizations": {
        "enabled": true,
        "rules": {
            "*.mutable": {
                "underline": false,
            }
        }
    }
}
user229044
  • 232,980
  • 40
  • 330
  • 338
nz_21
  • 6,140
  • 7
  • 34
  • 80
  • 9
    As someone who is legally, but not completely, blind this has always been a hindrance. I had no idea this could be turned off. Thank you for the question, and for posting the solution. – John H Sep 22 '20 at 17:12
  • Command palette > open user settings | add it to the json file it opens. – Chris Jul 02 '22 at 06:51
1

Try adding the following line to settings.json

"editor.semanticHighlighting.enabled": false,
viktaur
  • 31
  • 1
  • 4
  • 2
    This does do the trick, though it also changes the colors of other things like macros, member-accesses, consts, and types (depending where its at) since they are no longer indicated as-to their semantic meaning. But of course people can decide for themselves if that's what they want. – kmdreko Sep 09 '22 at 16:50