Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element closing tag spans #51

Open
gbj opened this issue Apr 5, 2023 · 0 comments
Open

Element closing tag spans #51

gbj opened this issue Apr 5, 2023 · 0 comments

Comments

@gbj
Copy link
Contributor

gbj commented Apr 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant