Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Helix: mismatching paren color in interpolated expression string #53

@ArthaTi

Description

@ArthaTi

Thank you for your work on the project! This is just a pedantic nitpick regarding syntax highlighting colors. :)

Describe the bug

A screenshot of a piece of D code in Helix, which uses interpolated expression string. There is a single interpolated expression, the left parenthesis of which displays in yellow, like the rest of the string, but the other parenthesis is gray.

When viewing D code in Helix, the left parenthesis in an interpolated string expression matches the string's color, but the right parenthesis is gray, like a regular token.

To Reproduce

I'm using Helix 24.7 with the following languages.toml grammar config:

[[grammar]]
name = "d"
source = { git = "https://github.com/gdamore/tree-sitter-d", rev = "45e5f1e9d6de2c68591bc8e5ec662cf18e950b4a" }

Grammars in Helix are updated using the commands:

$ hx --grammar fetch
$ hx --grammar build

Open a D file:

void main() {
    writeln(i"text $(value)");
}

It also appears to be reproducible in tree-sitter-cli:

tree-sitter-cli output for a D file with similar output.

Expected behavior

Both parentheses should be the same color.

Additional context

Helix 24.7 with tree-sitter-d 0.8.2. I'm using monokai_pro as my theme.

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