Saved theme doesn't load properly
2ELCN0168 opened this issue · 4 comments
Hello,
First, let me tell you that this simple plug-in is insane.
But I have an issue.
When using the persistence feature, it seems that there are problems with loading the saved theme.
For example, this is how tokyonight-day looks like normally:
And this is what it looks like when I open Neovim and it is the saved theme loaded by themery:
We can see a black line at the top of the terminal.
It may be a conflict with the plug-in "bufferline.nvim"?
If you have any question, let me know :)
EDIT 1 : It happens with some other themes too, it's not specific to tokyonight.
Hey!
Thanks a lot for your comment! and for reporting the problem.
I've been looking around and I'm not sure why it's happening. Maybe it has something to do with the order in which the theme and plugin configs (bufferline in this case) are loaded.
For testing, is there any difference changing the order of importing the persistence file? (i.e. importing it before, and after the plugins).
I'm going to keep investigating this problem until I find the solution.
Thank you for your reply!
Unfortunately, I can't achieve what you are asking for. I struggle a lot to configure Neovim and I have no Lua knowledge.
Maybe you could help?
How can I make Lazy load the file "theme.lua" (persistence file) before/after my themes?
For example, some of my themes have this configuration :
return {
"folke/tokyonight.nvim", (or any other one)
lazy = false,
priority = 1000,
}
And some of them don't have the lazy/priority parameters. But that doesn't change Themery behavior.
Thank you for your reply!
Unfortunately, I can't achieve what you are asking for. I struggle a lot to configure Neovim and I have no Lua knowledge.
Maybe you could help?
How can I make Lazy load the file "theme.lua" (persistence file) before/after my themes?
For example, some of my themes have this configuration :
return { "folke/tokyonight.nvim", (or any other one) lazy = false, priority = 1000, }
And some of them don't have the lazy/priority parameters. But that doesn't change Themery behavior.
I had the same issue, having a look at your configuration i suppose that you should remove themeConfigFile = '~/.config/nvim/lua/sakai/core/theme.lua', -- Described below
from themery.lua
since it's deprecated (commit 5307d0b) and delete theme.lua
.
To load themery first you have 2 ways since you are loading everything via imports:
- Handle the import in another way for all the plugins
- Load themery before everything else in another way
- Call
themery.lua
something likea_themery.lua
so that it gets red first
Hello,
Thank you for your reply!
It seems to have worked.
Here's what I did:
- Renamed the file to "a_themery.lua" ;
- Deleted the file "theme.lua" ;
- Commented/deleted the line "themeConfigFile = " in "a_themery.lua" ;
- Added the following lines in "a_themery.lua":
lazy = false,
priority = 1000,
Like that, everything is loading properly at the start of Neovim without the need to load manually the theme. Persistence is working too.