brenoprata10 / nvim-highlight-colors

Highlight colors for neovim
724 stars 33 forks source link

unable to highlight css custom properties #47

Closed shivamchandra75 closed 9 months ago

shivamchandra75 commented 1 year ago

can't see preview of colors in custom properties.

see line 3 and line 25

Screenshot 2023-10-19 at 10 51 18 PM

am i doing something wrong ?

My config

local status_ok, highlight = pcall(require, "nvim-highlight-colors")
if not status_ok then
    return
end
highlight.setup({
    render = "background", -- or 'foreground' or 'first_column'
    enable_named_colors = true,
    enable_tailwind = false,
    custom_colors = {
        -- label property will be used as a pattern initially(string.gmatch), therefore you need to escape the special characters by yourself with %
        { label = "%-%-theme%-font%-color", color = "#fff" },
        { label = "%-%-theme%-background%-color", color = "#23222f" },
        { label = "%-%-theme%-primary%-color", color = "#0f1219" },
        { label = "%-%-theme%-secondary%-color", color = "#5a5d64" },
        { label = "%-%-theme%-contrast%-color", color = "#fff" },
        { label = "%-%-theme%-accent%-color", color = "#55678e" },
    },
})
brenoprata10 commented 11 months ago

your config seems correct, but I have only tested it with Plug, I am not sure if your plugin manager is breaking something up. Did you manage to make it work?