projekt0n / github-nvim-theme

GitHub's Neovim themes
MIT License
2.07k stars 106 forks source link

feat: transparent background on lualine empty sections #192

Closed bhushan closed 2 years ago

bhushan commented 2 years ago

This PR makes transparent background of the lualine empty sections.

Screenshot 2022-07-04 at 1 17 38 AM

For Light Mode and Other theme as well it makes transparent background.

Screenshot 2022-07-04 at 1 26 37 AM
bhushan commented 2 years ago

@ful1e5 transparent mode looks horrible.. i wonder what is the use case of it 😅? Screenshot 2022-07-13 at 10 14 26 PM

bhushan commented 2 years ago

Screenshot 2022-07-13 at 10 12 17 PM

Lualine still shows, black bg..

bhushan commented 2 years ago

Screenshot 2022-07-13 at 10 16 13 PM

I changed my terminal color to white then it looks good but i still have color on lualine..

bhushan commented 2 years ago

with my changes, and transparent mode, it works nicely..

Screenshot 2022-07-13 at 10 21 45 PM

Screenshot 2022-07-13 at 10 18 54 PM

smjonas commented 2 years ago

Not sure if this was an improvement for all users :D When global statusline is enabled it now looks like this (previously, the separator seemed to "touch" the statusline because it had a different color which looked much less weird imo):

github_colorscheme_issue

It looks even worse with a higher value of cmdheight.

Relevant settings:

vim.opt.laststatus = 3
vim.opt.fillchars:append {
  horiz = "━",
  horizup = "┻",
  horizdown = "┳",
  vert = "┃",
  vertleft = "┨",
  vertright = "┣",
  verthoriz = "╋",
}
bhushan commented 2 years ago

I think this is correct behaviour right ?

smjonas commented 2 years ago

Well there is no right or wrong, it's just preference. To me it looks worse than before because the separator is kind of "floating" now. Maybe there could be an option transparent_statusline?

bhushan commented 2 years ago

Let's see what @ful1e5 suggests.

ful1e5 commented 2 years ago

No, I don't think so. This theme is getting very complicated lately and some features are not working properly like hiding inactive statusline. Along with that, Some colors have also changed and some have been deprecated in primer-primitive. So I am planning to fix all these bugs first and restructure the whole theme with native lua functions(which require nvim>0.0.7) and also setup options.

Second about this PR. I think this is a mistake because it is causing multiple problems technically and visually which is related to the utility function written for lightening and darkening the colors. @bhushan set the color amount to 0 so passing with the utility functions util.darken and util.lighten does not make any sense because it returns the same value as the color which was passed(In this case bg). And if the user has set the transparent option to true in this theme, then the separator symbols of lualine will be seen without color so that needs to be changed.

Sorry, I'm reverting this PR @bhushan. Thanks for contributing.

bhushan commented 2 years ago

Thanx @ful1e5 i will find another way to make it transparent on my machine.. i really love this theme.. let me know if i can help you with something..