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

Syntax highlighting is weird for Rust match on enum with data #3121

Closed
A-Walrus opened this issue Jul 20, 2022 · 2 comments · Fixed by #3131
Closed

Syntax highlighting is weird for Rust match on enum with data #3121

A-Walrus opened this issue Jul 20, 2022 · 2 comments · Fixed by #3131
Labels
C-bug Category: This is a bug

Comments

@A-Walrus
Copy link
Contributor

Summary

The syntax highlighting is weird in this example, Some is in white, while None is green (monokai theme).
image

Reproduction Steps

I tried this:

  1. hx
  2. write some code with match, like this:
fn main() {
    let opt = Some(5);
    match opt {
        Some(a) => {}
        None => {}
    }
}

I expected this to happen:
Both Some and None are highlighted in the same way.

Instead, this happened:
Some is white, while None is green

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

Linux

Terminal Emulator

Kitty, Alacritty

Helix Version

helix 22.05

@A-Walrus A-Walrus added the C-bug Category: This is a bug label Jul 20, 2022
@kirawi
Copy link
Member

kirawi commented Jul 20, 2022

It's being highlighted as @constructor

@erasin
Copy link
Contributor

erasin commented Jul 21, 2022

monokai theme content , the constructor is text.

cd ~/.config/helix make themes folder ,copy your theme from runtime/themes/monokai.toml, and rewrite constructor of content

"constructor" = { fg = "fn_declaration" }

reload hx or input command :config-reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants