brenoprata10 / nvim-highlight-colors

Highlight colors for neovim
720 stars 33 forks source link

[ISSUE] Unable to define custom icons for completion menu #108

Closed GR3YH4TT3R93 closed 4 months ago

GR3YH4TT3R93 commented 4 months ago

The latest update is working as expected but with cmp-tailwind colors, I was able to define my own icons for other entries in the menu as follows:

    local cmp = require("cmp")
    local kind_icons = {
      Text = "",
      Method = "󰆧",
      Function = "󰊕",
      Constructor = "",
      Field = "",
      Variable = "󰂡",
      Class = "󰠱",
      Interface = "",
      Module = "",
      Property = "󰜢",
      Unit = "",
      Value = "󰎠",
      Enum = "",
      Keyword = "󰌋",
      Snippet = "",
      Color = "󰏘",
      File = "󰈙",
      Reference = "",
      Folder = "󰉋",
      EnumMember = "",
      Constant = "󰏿",
      Struct = "",
      Event = "",
      Operator = "󰆕",
      TypeParameter = "󰅲",
      Copilot = "",
    }
    cmp.setup({
      formatting = {
        -- fields = { "kind", "abbr", "menu" }, -- order of columns,
        format = function(entry, item)
          item.menu = item.kind
          item = require("cmp-tailwind-colors").format(entry, item)
          if kind_icons[item.kind] then
            item.kind = kind_icons[item.kind] .. " "
          end
          return item
        end,
      },
    })
GR3YH4TT3R93 commented 4 months ago

Is there a way of doing something similar with nvim-highlight-colors?

brenoprata10 commented 4 months ago

Hey o/ I have updated the readme. Please check it out