nova.nvim
nova.nvim copied to clipboard
error while loading colorscheme
When
loading nova colorscheme by :colorscheme nova
Error Message
Error detected while processing /Users/(username)/.local/share/nvim/site/pack/packer/start/nova.nvim/colors/nova.lua:
E5113: Error while calling lua chunk: .../nvim/site/pack/packer/start/nova.nvim/lua/nova/init.lua:23: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
.../nvim/site/pack/packer/start/nova.nvim/lua/nova/init.lua:23: in function 'load'
...re/nvim/site/pack/packer/start/nova.nvim/colors/nova.lua:1: in main chunk
Environment
OS: macOS Monterey 12.6
Nvim: v0.8.0
Could you show your configuration?
Em...maybe you forget to setup configuration before load the scheme, look this for your reference:
https://github.com/zanglg/nova.nvim/blob/46e0b9026a5eca7e07001e29ef2a9e692e3f980a/README.md?plain=1#L21-L32
PS: there should be a guard if someone forget configuration 😄
added require'nova'.setup()
and everything work fine... Thank you!
Now I can use nova colorscheme. But I can't switch background color like light to dark or vice versa.
I'm currently using amdt/sunset
plugin which automatically switch background color sync with sunset/sunrise. Thus I hope to set background via
set background=dark / light
or
vim.o.background='dark' / 'light'
Is there any way to do this?
Also have a look at above, setup()
has a parameter: require("nova").setup({ background = "dark" })
Also have a look at above,
setup()
has a parameter:require("nova").setup({ background = "dark" })
Yes. I did that. But It seems only executed at Neovim startup. I look forward the way to switch background while using nova.
Some work was not finished, you can's switch between dark and light while using Neovim. Some configuration was lost after first initialization, I'll fix this bug recently.
OK. I've forgotten this project is WIP...
I'll wait for the release!
Now, you can switch background with lua, like:
require("nova").setup({ background = "dark" })
require("nova").load()
set background = dark / light
was still not used yet
After 1e1da07 merged, it's able to switch background with set background = dark / light
This issue was closed, if there is still problems, please reopen it.