Question

How do I disable the underlining of Rust variables and their methods in Visual Studio Code?

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.

 46  7473  46
1 Jan 1970

Solution

 70

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,
            }
        }
    }
}
2020-09-22

Solution

 0

Try adding the following line to settings.json

"editor.semanticHighlighting.enabled": false,
2022-09-09