0

I am testing whether it's working or not by following the instructions here.

I do not see a "semantic token type" section in the inspector popup.

Furthermore, if I change the color of a very obvious token type ("variable") to something unmistakable like "red", I do not see any color changes being applied.

I have enabled semantic highlighting both globally, and for the particular theme I am using:


    "editor.semanticHighlighting.enabled": true,
    "editor.semanticTokenColorCustomizations": {
        "[Darcula Solid]": {
            "enabled": true,
            "rules": {
                "variable": "#ff0000"
            }
        }
    },

What else can I try?

starball
  • 20,030
  • 7
  • 43
  • 238
bzm3r
  • 3,113
  • 6
  • 34
  • 67

1 Answers1

0

The issue turned out to be that rust-analyzer was not running for the particular project I was in, as it couldn't figure out what Cargo.toml was associated with the project. Stopping rust-analyzer and restarting it caused it to trigger a pop-up which suggests a possible Cargo.toml, which in my case, was sufficient to get rust-analyzer working, and then semantic highlighting.

bzm3r
  • 3,113
  • 6
  • 34
  • 67