Skip to content

Theme: Font weight ignored when string.escape has same color as string #42297

@asibahi

Description

@asibahi

Summary

In my theme, I have a font-weight setting for string.escape. The setting is not being respected. the font used, Cascadia Code, does have that weight. This is a regression from past versions of Zed.

Description

My buffer font is Cascadia Code. Font weight is 350. This is from settings.json

	"buffer_font_size": 13,
	"buffer_font_family": "Cascadia Code",
	"buffer_font_weight": 350,

The following json is in my theme under "syntax".

"string": {
	"color": "#5D81A8"

},
"string.escape": {
	"color": "#5D81A8",
	"font_weight": 800
},

This is what it looks like in my editor

Image

Changing the "color" property does affect string escapes. For example changing "color" to #FF0000 gives me the following.

Image

Expected Behavior:

Escapes be bold. This used to work in previous versions of Zed.

Actual Behavior:

Escapes not bold.

Zed Version and System Specs

Zed: v0.211.6 (Zed)
OS: macOS 26.0.1
Memory: 8 GiB
Architecture: aarch64

If applicable, attach your Zed.log file to this issue.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ui/themesFeedback for theme configuration, accessibility, visual issues, etc

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions