Skip to content

Fix syntax highlighting for lifetime annotations #42030

@zachmeyer

Description

@zachmeyer

Summary

Lifetime annotations only highlight the tick mark, rather than the entire lifetime name, making the transition to Zed from VS Code impossible for me, as with poor vision I rely on colorization to be able to discern different parts of the code more easily.

PS: Syntax highlighting in Zed in general needs some major improvements, but for now, this is the only one that is untenable for me.

Description

Image Image Image Image

Steps to reproduce:

  1. Use Zed

Syntax highlighting settings:

"syntax": { "attribute": { "color": "#8090a8" }, "attribute.test": { "color": "#06b6d4" }, "boolean": { "color": "#e879f9" }, "builtinType": { "color": "#a78bfa" }, "character": { "color": "#6ee7b7" }, "comment": { "color": "#a8b8d5" }, "comment.documentation": { "color": "#8b8bcc" }, "const": { "color": "#fbbf24" }, "constParameter": { "color": "#fcd34d" }, "decorator": { "color": "#9ca3af" }, "derive": { "color": "#d946ef" }, "enum": { "color": "#fde047" }, "enumMember": { "color": "#60a5fa" }, "formatSpecifier": { "color": "#5eead4" }, "function": { "color": "#38bdf8" }, "function.unsafe": { "color": "#f87171" }, "function.unwrap": { "color": "#fb923c" }, "interface": { "color": "#67e8f9" }, "keyword": { "color": "#c084fc" }, "keyword.controlFlow": { "color": "#a3e635" }, "keyword.unsafe": { "color": "#ef4444" }, "label": { "color": "#4ade80" }, "lifetime": { "color": "#00FF00" }, "lifetime.decl": { "color": "#00FF00" }, "macro": { "color": "#f472b6" }, "method": { "color": "#60a5fa" }, "module": { "color": "#facc15" }, "namespace": { "color": "#fbbf24" }, "number": { "color": "#d8b4fe" }, "operator": { "color": "#fb923c" }, "other": { "color": "#fde68a" }, "parameter": { "color": "#f9a8d4" }, "property": { "color": "#94e2d5" }, "reference": { "color": "#5fb3a1" }, "selfKeyword": { "color": "#22d3ee" }, "string": { "color": "#a7f3d0" }, "string.escape": { "color": "#5eead4" }, "struct": { "color": "#93d5ff" }, "type": { "color": "#fde047" }, "typeParameter": { "color": "#f0abfc" }, "union": { "color": "#ffa13d" }, "variable": { "color": "#d4d4d8" }, "variable.mutable": { "color": "#d4d4d8" } }

Zed Version and System Specs

Zed: v0.211.4 (Zed)
OS: Windows 10.0.26220
Memory: 15.3 GiB
Architecture: x86_64
GPU: AMD Radeon(TM) Graphics || AMD Corporation || 24.10.20.21 (24.10.20.21-250429a-415282C-HP)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions