8000 Incorrect syntax highlight for heredoc + named tuple on the same line · Issue #8 · crystal-lang-tools/zed-crystal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Incorrect syntax highlight for heredoc + named tuple on the same line #8

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

Open
BigBoyBarney opened this issue Feb 10, 2025 · 2 comments

Comments

@BigBoyBarney
Copy link
Contributor
BigBoyBarney commented Feb 10, 2025

Hi!

The following example is highlighted incorrectly.

DATABASE.query_all(<<-SQL, as: {id: Int64, image: String?})
  sql query here
  SQL

The interesting thing is that the error varies from theme to theme.
OneDark Pro
Image

Tokyo Night Storm
Image


Adding a whitespace between the curly braces and the code solves it in the OneDark Pro case, but not Tokyo Night Storm:

Image

Image

@BigBoyBarney
Copy link
Contributor Author
BigBoyBarney commented Feb 10, 2025

Potentially related? Annotations seem to be affected as well:

@[]
def snorlax
end

Image

@nobodywasishere
Copy link
Member
5C7F

That annotation part looks like a separate issue.

This is due to as, if it's changed to anything else it parses correctly. See crystal-lang-tools/tree-sitter-crystal#39

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

2 participants
0