oxocarbon.nvim icon indicating copy to clipboard operation
oxocarbon.nvim copied to clipboard

colors are looking weird on cmp menu

Open datsfilipe opened this issue 2 years ago • 14 comments

Look, the "f"s from function items are with the background colored, not the text. It changes when they're in selection line: image

Also, It can be a thing of mine configuration, but seemed to be that there's a little lag before the right colors are applied. Maybe it's something related to treesitter. The colors do not apply fast as other colorschemes, they take like 1-2 seconds to apply.

datsfilipe avatar Feb 05 '23 02:02 datsfilipe

Didn't experienced the lag again, this might be something on other plugins too and the cmp menu seems that has been planned to be that way (I did not paid attention, sry), so there's everything okay.

datsfilipe avatar Feb 25 '23 01:02 datsfilipe

Yes, the CmpItemKind* highlight sets the background color, I think it's due to this theme is very nyoom.nvim oriented, for me, I did something like this to overrides CmpItemKind* highlight

for _, kind in ipairs({
  "Interface",
  "Color",
  "TypeParameter",
  "Text",
  "Enum",
  "Keyword",
  "Constant",
  "Constructor",
  "Reference",
  "Function",
  "Struct",
  "Class",
  "Module",
  "Operator",
  "Field",
  "Property",
  "Event",
  "Unit",
  "Snippet",
  "Folder",
  "Variable",
  "File",
  "Method",
  "Value",
  "EnumMember",
}) do
  local group = string.format("CmpItemKind%s", kind)
  local bg = vim.api.nvim_get_hl_by_name(group, true)["background"]
  bg = bg and string.format("#%06X", bg) or "NONE"

  vim.api.nvim_set_hl(0, group, { fg = bg })
end

fitrh avatar Feb 26 '23 07:02 fitrh

Indeed the theme is pretty much directly copied from nyoom with a small patch, I will add an option to use the "regular" cmp color for non-nyoom users

shaunsingh avatar Feb 26 '23 08:02 shaunsingh

Or remove all nyoom.nvim-specific stuff from this theme and let nyoom.nvim configure this theme

fitrh avatar Feb 26 '23 08:02 fitrh

Look, the "f"s from function items are with the background colored, not the text. It changes when they're in selection line: image

Also, It can be a thing of mine configuration, but seemed to be that there's a little lag before the right colors are applied. Maybe it's something related to treesitter. The colors do not apply fast as other colorschemes, they take like 1-2 seconds to apply.

Awesome theme. Would really appreciate if the completion menu can be fixed. Thx!!!

boydkelly avatar Mar 20 '23 23:03 boydkelly

I can offer a pull request for this. I find that making the item's bg the same as the menu bg (oxocarbon.base04) or setting it to oxocarbon.none has the same effect. Is there any preference?

boydkelly avatar Mar 21 '23 09:03 boydkelly

Yes, the CmpItemKind* highlight sets the background color, I think it's due to this theme is very nyoom.nvim oriented, for me, I did something like this to overrides CmpItemKind* highlight

Also another possiblilty is to make the completion menu like nyoom. Just add

        formatting = {
          fields = { "kind", "abbr", "menu" },

to the cmp.setup and it will put the symbol at the begining of the line of the completion menu. Its starting to look better, but I just need to figure out how to add some space around the symbol....

Screenshot from 2023-03-23 16-02-08

boydkelly avatar Mar 23 '23 16:03 boydkelly

Ok I got it. @datsfilipe In addition to cmp.setup formatting fields, you need to add (with spaces surrounding the symbols)

 require("lspkind").init({
 symbol_map = {
 Text = "  ",

Screenshot from 2023-03-23 16-31-22

boydkelly avatar Mar 23 '23 16:03 boydkelly

@boydkelly it looks prettier but what I was complaining about was mainly because it is coloring the background instead of the symbol like other themes often do. Also, the main issue has become the fact that the theme is very 'Nyoom.nvim' oriented and not very independent I think. At least that's what is being said here:

Or remove all nyoom.nvim-specific stuff from this theme and let nyoom.nvim configure this theme

Note: I'm not using the theme right now, I'm kind of waiting for changes since I like it, but thanks anyway for trying to help!

datsfilipe avatar Mar 23 '23 21:03 datsfilipe

@boydkelly

Ok I got it. @datsfilipe In addition to cmp.setup formatting fields, you need to add (with spaces surrounding the symbols)

 require("lspkind").init({
 symbol_map = {
 Text = "  ",

Screenshot from 2023-03-23 16-31-22

I had this issue and was very sad because I very like the theme but your solution solved my issue thank you very much. I really hope you fix this in the colorscheme it self in the near future

yousef8 avatar Jul 24 '23 15:07 yousef8

+1 still waiting on this, please make it possible to set icon (foreground) color instead of background color

avikrao avatar Aug 28 '23 22:08 avikrao