NvChad / ui

Lightweight & high performance UI plugin for nvchad
GNU General Public License v3.0
290 stars 133 forks source link

Tailwind colors CMP formatter not working #376

Closed wustho closed 3 weeks ago

wustho commented 3 weeks ago

Seems like caused by no hex code, but instead rgb(x, x, x), in current tailwindcss documentation. https://github.com/NvChad/ui/blob/04ed330c30b1a34641b638b4f94a6bb08f158c74/lua/nvchad/cmp/format.lua#L10 2024-10-18_07-06

siduck commented 3 weeks ago

Its disabled by default so enable it

M.ui = {
  cmp = {
    icons_left = true,
    format_colors = {
      tailwind = true,
    },
  },

image

wustho commented 3 weeks ago

Sorry @siduck forgot to mention, I already did

return {
    base46 = {
        theme = 'gruvchad',
        -- theme = 'kanagawa',
        -- theme = 'onedark',
        -- theme = 'wombat',
        transparency = false,
        integrations = {
            'cmp',
            -- 'devicons',
            'lsp',
            'navic',
            'treesitter',
            'alpha',
            'statusline',
            'blankline',
            'syntax',
            'todo',
            'vim-illuminate',
            'defaults',
            'git',
        },
    },
    ui = {
        cmp = {
            -- lspkind_text = true,
            -- style = 'atom', -- default/flat_light/flat_dark/atom/atom_colored
            icons_left = true,
            format_colors = {
                tailwind = true,
            },
        },
        tabufline = {
            enabled = false,
        },
        statusline = {
            enabled = false,
            theme = 'vscode_colored',
        },
    },
    colorify = {
        enabled = true,
        mode = 'virtual',
        virt_text = '󱓻 ',
        highlight = { hex = true, lspvars = true },
    },
}
wustho commented 3 weeks ago

Ops, nevermind @siduck, I updated the wrong tailwind langserver. Updating tailwind lang server should fix this. Thanks man

siduck commented 3 weeks ago

all good!