rose-pine / neovim

Soho vibes for Neovim
MIT License
2.25k stars 144 forks source link

feature: Custom highlight context #284

Closed brunoferromega closed 2 months ago

brunoferromega commented 2 months ago

Describe the solution you'd like

I would like to change the color in the context highlight, for example: I saw you have color palette named "Iris", I tried to change ["@type"] with this color("iris") using highlight_groups options, but I couldn't.

Additional context

Screenshot from 2024-07-09 18-17-19

Above the example of I had been trying.

mvllow commented 2 months ago

Hmm, this seems to work for me:

require("rose-pine").setup({
    highlight_groups = {
        ["@type"] = { fg = "iris" },
    },
})
brunoferromega commented 2 months ago

Nice, you are right, but I didn't know that I should use this "string annotation/decoration"(["@type"]) form that way. Now it's working great, thank you for your support.

mvllow commented 2 months ago

That's a lua thing, because "@" is a special character. ["..."] enables more flexibility with the key names.