brenoprata10 / nvim-highlight-colors

Highlight colors for neovim
724 stars 33 forks source link

Idk how to use with my icons #125

Closed MuntasirSZN closed 3 weeks ago

MuntasirSZN commented 1 month ago

Pls help. My icons working correctly, but the colors squared not showing in tailwind in the right side.

cmp.setup({
                formatting = {
                    format = function(entry, item)
                        item.kind = string.format("%s%s", icons.kinds[item.kind] or "", item.kind)
                        item = require("nvim-highlight-colors").format(entry, item)
                        return item
                    end,
                },
MuntasirSZN commented 1 month ago

I did some tweaking, this kinda works. Just, i want the highlighted color on left side of the word bg.

cmp.setup({
        formatting = {
          format = function(entry, item)
            local color_item = require("nvim-highlight-colors").format(entry, { kind = item.kind })
            item.kind = string.format("%s %s", icons.kinds[item.kind] or "", item.kind)
            if color_item.abbr_hl_group then
              item.kind_hl_group = color_item.abbr_hl_group
              item.kind = color_item.abbr
            end
            return item
          end,
        },

image

I want it to be on the right side.

brenoprata10 commented 3 weeks ago

Please refer to the README