tree-sitter / tree-sitter-rust

Rust grammar for tree-sitter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to color enum items/members?

amaanq opened this issue · comments

As the title suggests, I would like to know if it's possible to use a custom color for enum items. It is very unclear and difficult to me to figure out the tags to use to change the color, but here's what I have so far...

highlights = {
    ["@field.rust"] = { fg = "${red}" },
    ["@function.macro.rust"] = { fg = "${orange}" },
    ["@keyword.rust"] = { fg = "${purple}" },
    ["@label.rust"] = { fg = "${white}" },
    ["@operator.rust"] = { fg = "${white}" },
    ["@parameter.rust"] = { fg = "${red}", style = "italic" },
    ["@punctuation.bracket.rust"] = { fg = "${purple}" },
    ["@variable.builtin.rust"] = { fg = "${purple}", style = "italic" },
}

Thanks!

(why not keep it open?)

it's a nvim-treesitter problem, and not sure if I can call it a problem since tree-sitter isnt an LSP, but I'm sure query match predicates can alleviate this anyways...there's an issue for this over there already.