38

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.

0

2 Answers 2

56

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,
            }
        }
    }
}
2
  • 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, 2020 at 17:12
  • Command palette > open user settings | add it to the json file it opens.
    – Chris
    Jul 2, 2022 at 6:51
1

Try adding the following line to settings.json

"editor.semanticHighlighting.enabled": false,
1
  • 3
    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 9, 2022 at 16:50

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.