onebuddy
onebuddy copied to clipboard
bug: can not get light colorscheme
Minimal init.lua:
setting vim.o.background to light has no effect
--vim.o.background = 'light'; --inserting here does not have an effect
require('packer').startup(
function()
use { 'wbthomason/packer.nvim' }
use { 'glepnir/lspsaga.nvim', requires = { 'neovim/nvim-lspconfig' } }
use { 'Th3Whit3Wolf/onebuddy', requires = { 'tjdevries/colorbuddy.nvim' } }
end
)
require('colorbuddy').colorscheme('onebuddy')
vim.o.background = 'light'; --sets vim.o.background, but I dont get the light colorscheme
in commandline: :lua print(vim.o.background) returns light, but the light colorscheme is not loaded.
It gets reset somewhere, when I set it in the first line. Ideas? Is this a neovim regression?
That's pretty weird. Does the color change when you enter :lua vim.o.background
@Th3Whit3Wolf Found the reason why. I guess this was changed upstream in colorbuddy.nvim at some point, but not documented:
https://github.com/tjdevries/colorbuddy.nvim/issues/17
Would be nice to document in usage of all your colorschemes or tell TJ to change:
require('colorbuddy').colorscheme('onebuddy', bg) where bg is either dark or light
For further inspiration of async loading stuff or using treesitter colorgroups consider stealing from glepnir: https://github.com/glepnir/zephyr-nvim/blob/main/lua/zephyr.lua
Sorry I have been busy. Would you mind sending a pull request?
@Th3Whit3Wolf I dont use onebuddy, since Treesitter alredy provides relative nice colorgroups: https://github.com/glepnir/zephyr-nvim/blob/main/lua/zephyr.lua
I was only noticing the bug on testing different colorschemes.