Why does Cursor show these large red areas? I assume it’s because of the white spaces/tabs for indentation. But how can I turn this off? Or at least make it less intrusive?
Hey, from the screenshot this isn’t Cursor highlighting. It’s the indent-rainbow extension oderwat.indent-rainbow. By default it marks incorrect indentation in red. It usually triggers when tabs and spaces are mixed, or when there’s an odd number of spaces, which is common in XAML and AXAML.
Options:
-
Turn off only the error highlighting and keep the rest. In
settings.json:"indentRainbow.colorOnWhiteSpaceOnly": true, "indentRainbow.errorColor": "rgba(128,32,32,0)"Or add your file type to the exclusions:
"indentRainbow.ignoreErrorLanguages": ["xml", "xaml"] -
Remove it completely by disabling or uninstalling indent-rainbow in the Extensions panel.
If the red marks are still there after disabling it, send one more screenshot and we’ll dig further.
Hey. The screenshot shows that the red highlight is on HTML attribute indentation ([routerLinkActiveOptions], routerLinkActive, etc). They’re aligned using a continuation style, not to the editor.tabSize boundary. Indent-rainbow treats any indentation that isn’t a multiple of tabSize as an error, even if it’s spaces only. Same thing happens in XAML when attributes are aligned.
A few options, pick what’s easiest:
- Just turn off error highlighting in the extension and keep the rest of the coloring. In
settings.json:
"indentRainbow.colorOnWhiteSpaceOnly": true,
"indentRainbow.errorColor": "rgba(128,32,32,0)"
- Exclude languages where you use attribute alignment:
"indentRainbow.ignoreErrorLanguages": ["html", "xml", "xaml"]
-
If the file uses, for example, 2-space indentation, make sure
editor.tabSizeis also set to 2. You can see the current value for the active file in the bottom-right of the status bar. -
If you don’t need indent coloring at all, it’s simplest to uninstall
oderwat.indent-rainbowvia Extensions.
If the red areas still show up after this, send a screenshot with the Extensions panel open and sorted by Enabled, and we’ll check what else might be adding the highlight.

