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

Cannot change dark version colors via ColorScheme autocmd #12

Closed
kristijanhusak opened this issue Jul 9, 2021 · 2 comments
Closed

Cannot change dark version colors via ColorScheme autocmd #12

kristijanhusak opened this issue Jul 9, 2021 · 2 comments

Comments

@kristijanhusak
Copy link

Hi,

I'm not able to change the colorscheme colors via ColorScheme autocmd when themeStyle is dark. For some strange reason light version works. I have this:

vim.cmd[[augroup vimrc_colorscheme]]
  vim.cmd[[autocmd ColorScheme * lua kris.colorscheme.setup_github()]]
vim.cmd[[augroup END]]

function _G.kris.colorscheme.setup_github()
  local colors = require('github-theme.colors').setup()
  vim.cmd(string.format('hi StatusLine guibg=%s', colors.white))
end

require("github-theme").setup({
  themeStyle = 'light',
})

But when I change themeStyle to dark, autocmd is never triggered:

require("github-theme").setup({
  themeStyle = 'dark',
})

Related issue for statusline: #11

@kristijanhusak
Copy link
Author

From what I figured, it has to do something with the default background setting.
For example, when I use dark kitty colors, default background is dark.
Then autocmd is not triggered for both light and dark themeStyle.

When I use light kitty colors, default background is light, and both dark and light themeStyles properly trigger autocmd.

It worked for me in the initial comment only for light because i toggle both kitty and neovim colors at the same time. When I tried dark colorscheme with light kitty it also worked.

@ful1e5
Copy link
Member

ful1e5 commented Sep 21, 2021

Now, You can switch with the colorscheme github_* command.

ref: dbb15b2

@ful1e5 ful1e5 closed this as completed Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants