The default “Cursor Dark” theme does not have proper support for YAML files. It has been like this for at least a year and ideally is a quick fix. Yes, I know we can simply change the theme, but it’d be nice to correct. A small thing, but these days, we all tend to look at a lot of YAML!
Steps to Reproduce
Open a YAML file in the Cursor Dark theme; no related third party extensions loaded. You will see pink keys and pink values.
Expected Behavior
At a minimum they keys and values would be a different color akin to other themes. The Cursor Light default theme presents them well as an example to emulate.
You’re right, Cursor Dark doesn’t give YAML keys their own color, so keys end up the same pink as string values. Cursor Light and Cursor Dark Midnight don’t have this problem. I’ve flagged it to the team.
In the meantime, you can fix it locally without switching themes. Open your user settings JSON (Command Palette, then “Preferences: Open User Settings (JSON)”) and add:
A fix for YAML keys showing up in the same pink as their values in Cursor Dark has landed and will be included in an upcoming version of Cursor (3.25). It also covers the Dark High Contrast and Dark Colorblind variants, and YAML true/false/null values will no longer show in the string pink either.
Once you’re on that version, you can remove the editor.tokenColorCustomizations workaround if you added it. It uses the same key color, so leaving it in place won’t cause any conflict.