olimorris / onedarkpro.nvim

🎨 Atom's iconic One Dark theme. Cacheable, fully customisable, Tree-sitter and LSP semantic token support. Comes with variants
MIT License
819 stars 46 forks source link

Unfocused window lua bar unreadable #40

Closed dstadelm closed 2 years ago

dstadelm commented 2 years ago

Hi there

Thank you for this very beautiful and configurable theme, I love it.

I have only one issue currently, which is the following

The foreground color (text color) of the unfocused windows is to similar to the background color so that the information is not readable.

This is especially noticeable when using e.g. dap_ui which annotates the windows contents in the window bar. Or if I want to read what file the other window is.

Is this a design decision? Can I somehow override it? I tried to override the hlgroup lualine_b_inactive and lualine_c_inactive with no success.

image

olimorris commented 2 years ago

My pleasure! Crikey that is horrible. You're right.

Right, I'll take a look at this tomorrow and get back to you. Thanks for flagging

olimorris commented 2 years ago

@dstadelm - I don't know why but I used the fg_gutter hl group for inactive lua lines. I think I was following a trend I saw with other themes but its naming doesn't make much sense. Either way, that is the group to override.

And...I had a ridiculously dark color set in the theme. It's lighter now. Let me know what you think

dstadelm commented 2 years ago

Hi, that was quick!

Thanks now it is perfect.

I have some tweaks that you might be intrested in (taken from navarasu/onedark.vim) The virtual text bothered me because it sometimes was indistinguishable from the actual content and I made following changes.

  hlgroups = {
           DiagnosticVirtualTextError = { fg = "#8b3434", bg = "#2a252b", style = "italic" },
           DiagnosticVirtualTextWarn = { fg = "#835d1a", bg = "#292928", style = "italic" },
           DiagnosticVirtualTextInfo = { fg = "#48b0bd", bg = "#25252b",  style = "italic" },
           DiagnosticVirtualTextHint = { fg = "#7e3992", bg = "#292534", style = "italic" },
  },

Maybe you like it or it might give inspiration :-)

olimorris commented 2 years ago

Hi, that was quick!

The virtual text bothered me because it sometimes was indistinguishable from the actual content and I made following changes.


  hlgroups = {

           DiagnosticVirtualTextError = { fg = "#8b3434", bg = "#2a252b", style = "italic" },

           DiagnosticVirtualTextWarn = { fg = "#835d1a", bg = "#292928", style = "italic" },

           DiagnosticVirtualTextInfo = { fg = "#48b0bd", bg = "#25252b",  style = "italic" },

           DiagnosticVirtualTextHint = { fg = "#7e3992", bg = "#292534", style = "italic" },

  },

Maybe you like it or it might give inspiration :-)

Oh this looks interesting. Can you share a screenshot of it in action? It's a very good point actually. I think I just use the default colors for diagnostic warnings so it will blend in!

olimorris commented 2 years ago

How do these look?

Dark

Screen Shot 2022-04-12 at 13 08 43@2x

Light

Screen Shot 2022-04-12 at 13 08 57@2x

You can toggle underline and italic off with a new style I'm calling virtual_text. Here I've set it to italic,underline. I've created four new colors which take the value of red, yellow, blue and cyan and apply a lighten or darken effect (depending if you're in onelight or onedark). That way, if the user overrides a red, the virtual text still matches their customization.

dstadelm commented 2 years ago

I'm not a big fan of underlines and in case of the virtual text even more so, but that is purely my subjective opinion.

This is what it looks with my mods

image

dstadelm commented 2 years ago

Maybe the lightbulb should be purple :-) I didnt get around to that

dstadelm commented 2 years ago

I just noticed this will not look as nice if the background isn't darkened like I've got it.

navarasu/onedark.vim has a function to darken the colors and also sets the background of the virtual text with some function, but I didn't quite understand how it is done. I'm not into lua yet to grasp things like that quickly.

olimorris commented 2 years ago

Yeah the underlines are off by default. Italics too. But easy to change in the config.

I'll play around with my settings and see how they look after some heavy usage 😉