Skip to content

Element closing tag spans #51

@gbj

Description

@gbj

We get pretty good syntax highlighting with our syn-rsx-based view macro in Leptos. Here's an example from VS Code:
Screenshot 2023-04-05 at 8 53 05 AM

The only issue is that closing tags are simply highlighted as plain identifiers, so a PascalCase component name looks like a struct, and a lowercased HTML element looks like a variable. I can imagine some ways I could improve this, but they rely on having access to the span of the closing tag. Unless I'm mistaken, the NodeName you can get from NodeElement::name() gives you the opening span, but there's not a way to get the span of the closing tag, if it exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions