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

Restructure themes.

Open shadmansaleh opened this issue 3 years ago • 3 comments

Changing color for all section based on mode doesn't make sense in my opinion. Most of the themes just change section_a color for modes to change color of mode component. I think this pattern is here because of bad design of themes . I'd like to change themes to something like this

theme = {
  sections = {a={fg=, bg=, gui=}, b={}, c={}, (optional x, y, z)}, -- z defaults to a, y -> b, x -> c
  inactive = {a={}, b={}, c={},  (optional x, y, z)}, -- optional inactive status color customization defaults to sections
  tabline = {a={}, b={}, c={},  (optional x, y, z)}, -- optional tabline color customization defaults to sections
  components = { -- optional component specific color customization.
    mode = { --mode colors effecting only mode component
      normal = {},
      insert = {},
      ...
   },
   diagnostics = { -- defaults for diagnostics_color option
       error = {},
       warn = {},
       ...
    }
   ....
   -- (other components)
}

You can share what you think about the idea here.

shadmansaleh avatar Feb 11 '22 18:02 shadmansaleh

Will highlight group names still be supported? (I assume yes if you assign a string instead of a table to, e.g., a, but want to make sure.)

Otherwise this sounds reasonable!

clason avatar Feb 12 '22 14:02 clason

Will highlight group names still be supported? (I assume yes if you assign a string instead of a table to, e.g., a, but want to make sure.)

Of course this won't remove any current capability from themes. Instead will give them more power (tabline & component color customization in themes) . Making sections change colors like current themes will also be possible using functions (I plan to be done with #566 by then) in new format.

shadmansaleh avatar Feb 12 '22 16:02 shadmansaleh

I think another good idea can be to put the colors table itself into the table you suggest, to be able to use this colors for custom components on lualine.

dcordb avatar May 22 '22 21:05 dcordb