Closed fedemengo closed 1 year ago
I agree. It would be nice if the theme didn't have several "github_light" and "github_dark" variants but just respected the background
option instead.
@fedemengo @paldepind
Using this user command, you can toggle the colorscheme to the appropriate opposite variant, apart from the github_dark_dimmed
variant using :ToggleGithubTheme
.
vim.api.nvim_create_user_command('ToggleGithubTheme', function()
local colo = vim.g.colors_name
if colo:find('dimmed') then
vim.cmd('colorscheme github_light')
elseif colo:find('dark') then
vim.cmd('colorscheme ' .. colo:gsub('dark', 'light'))
else
vim.cmd('colorscheme ' .. colo:gsub('light', 'dark'))
end
end, {})
@ful1e5 Sorry, but this doesn't really address the original issue. The theme still does not take Vim's background
value into account as far as I can tell. Great theme otherwise 👍
@fedemengo @paldepind
Using this user command, you can toggle the colorscheme to the appropriate opposite variant, apart from the
github_dark_dimmed
variant using:ToggleGithubTheme
.vim.api.nvim_create_user_command('ToggleGithubTheme', function() local colo = vim.g.colors_name if colo:find('dimmed') then vim.cmd('colorscheme github_light') elseif colo:find('dark') then vim.cmd('colorscheme ' .. colo:gsub('dark', 'light')) else vim.cmd('colorscheme ' .. colo:gsub('light', 'dark')) end end, {})
How does this solve the original issue?
It would be nice if by toggling
vim.o.background
tolight/dark
the theme would automatically set the appropriate colorschemeIn my config I create an [autocmd](https://neovim.io/doc/user/api.html#nvim_create_autocmd()) to do that, I don't know if this is the best way to do it