Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigning bg_sidebar to bg_folded doesn't make the folds{,column} transparent with transparency enabled #36

Closed
wimstefan opened this issue Jul 16, 2021 · 3 comments
Assignees
Labels
assigned Under progress. bug Something isn't working

Comments

@wimstefan
Copy link

I'm assigning different colors to folds as you suggested in issue #26 and it works so well :)

There is one thing though which I don't understand:
Using

colors = {fg_folded = colors.fg, bg_folded = colors.bg_sidebar}

should give me a transparent fold{,column} background if transparent is set to true if I understand the configuration in colors.lua correctly? It is not the case in my configuration ...
Here is the content of nvim_theme.lua

vim.o.background = 'dark'

if vim.o.background == 'dark' then
  local themeStyle = 'dimmed'
  local colors = require('github-theme.colors').setup({themeStyle = themeStyle})
  require('github-theme').setup({
    colors = {fg_folded = colors.fg, bg_folded = colors.bg_sidebar},
    sidebars = {'netrw', 'packer', 'qf', 'terminal'},
    themeStyle = themeStyle,
    transparent = true,
  })
else
  local themeStyle = 'light'
  local colors = require('github-theme.colors').setup({themeStyle = themeStyle})
  require('github-theme').setup({
    colors = {fg_folded = colors.fg, bg_folded = colors.bg_sidebar},
    sidebars = {'netrw', 'packer', 'qf', 'terminal'},
    themeStyle = themeStyle,
    transparent = true,
  })
end

I'm sure I'm doing something wrong but I couldn't find the solution yet ...

ful1e5 added a commit to ful1e5/github-nvim-theme that referenced this issue Jul 18, 2021
@ful1e5 ful1e5 added assigned Under progress. bug Something isn't working labels Jul 18, 2021
@ful1e5
Copy link
Member

ful1e5 commented Jul 18, 2021

I patched 6a95cca to the upstream. Now you are able to set transparent background with NONE value.

vim.o.background = "dark"
local transparent = true

if vim.o.background == "dark" then
  local themeStyle = "dimmed"
  local colors = require("github-theme.colors").setup({themeStyle = themeStyle})
  require("github-theme").setup({
    colors = {bg_folded = transparent and "NONE" or colors.bg_sidebar},
    sidebars = {"netrw", "packer", "qf", "terminal"},
    themeStyle = themeStyle,
    transparent = transparent
  })
else
  local themeStyle = "light"
  local colors = require("github-theme.colors").setup({themeStyle = themeStyle})
  require("github-theme").setup({
    colors = {bg_folded = transparent and "NONE" or colors.bg_sidebar},
    sidebars = {"netrw", "packer", "qf", "terminal"},
    themeStyle = themeStyle,
    transparent = transparent
  })
end

@ful1e5
Copy link
Member

ful1e5 commented Jul 18, 2021

Also, You don't have to override the fg_folded value to colors.fg because it's already assigned inside colors.lua.

-- Folded colors are configurable
colors.fg_folded = colors.fg
colors.bg_folded = colors.bg_visual_selection

@ful1e5 ful1e5 self-assigned this Jul 18, 2021
@wimstefan
Copy link
Author

Looking good. Very good :D
I guess I simply was thinking the wrong way when I supposed that bg_sidebar is getting transparent as well just when I've set transparent = true ;)

Thank you so much for your support! 🙏

@ful1e5 ful1e5 closed this as completed Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned Under progress. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants