Open rin-yato opened 11 months ago
I have the same issue with the slate preset :
return {
"jesseleite/nvim-noirbuddy",
dependencies = {
"tjdevries/colorbuddy.nvim",
branch = "dev",
lazy = false,
priority = 1000,
},
config = function()
require("noirbuddy").setup {
preset = "slate",
}
vim.cmd.colorscheme "noirbuddy"
end,
}
@rin-yato Check the readme for lazy.nvim, you must have lazy = false
for this plugin.
@enzime4u Also check readme, you shouldn't nest lazy
or priority
settings on the colorbuddy dependency, but rather on noirbuddy itself. You also shouldn't need to set vim.cmd.colorscheme "noirbuddy"
.
Here's how we're recommending you setup in readme...
Hope it helps! ❤️
@jesseleite I actually followed the doc shown but it didnt work either, I also tried changing the priority but that still didnt do anything. The problem that i have is that I need to include this line
{ "LazyVim/LazyVim", opts = { colorscheme = "noirbuddy" } }
otherwise lazyvim will fallback to tokyonights, but when i add that line it seems to override the other config and uses the minimal preset instead.
Oh interesting. Never tested with a NeoVim 'distro' like LazyVim. Misread the issue title and thought you meant lazy.nvim (the package manager). Will look into!
Any progression on this? I'm experiencing the same thing with LunarVim, it uses lazy. I have the following config and trying to set the slate
preset but it does not work:
Any progression on this? I'm experiencing the same thing with LunarVim, it uses lazy. I have the following config and trying to set the
slate
preset but it does not work:
So i forked the repo and make it so that it always load one preset, then i just install the plugin from my repo instead. But I still had some problem with using miami-nights, the some reason the light cyan color doesnt work well, other than that the preset loads fine.
Any progression on this? I'm experiencing the same thing with LunarVim, it uses lazy. I have the following config and trying to set the
slate
preset but it does not work:So i forked the repo and make it so that it always load one preset, then i just install the plugin from my repo instead. But I still had some problem with using miami-nights, the some reason the light cyan color doesnt work well, other than that the preset loads fine.
Thanks for the tip!
Sorry I haven't had time to pull LazyVim and try this myself yet. Will leave this issue open until I / someone can help pinpoint the problem!
So i forked the repo and make it so that it always load one preset
Also, @rin-yato can you share your fork so I can take a look at your changes?
I can't reproduce the issue either. If someone can post their dotfiles, I could take a look. I suspect somewhere people might be doing vim.cmd.colorscheme = "noirbuddy"
(which isn't needed), maybe?
I ran into the same issue using kickstart.nvim (not technically a distro, but also uses lazy.nvim) and the only way to make it work for me was to use a priority value lower than the default (less than 50). I have no idea why it works that way, but maybe the information will be useful to you.
return {
'jesseleite/nvim-noirbuddy',
dependencies = {
{ 'tjdevries/colorbuddy.nvim' }
},
lazy = false,
priority = 49,
opts = {
preset = 'slate',
},
}
@monita-hungara-13 Might depend on if other plugins have priorities set? Will try with kickstart.nvim soon. Thanks for the info!
@jesseleite I just found the reason😅. I use transparent.nvim, and it seems to internally reset the current colorscheme every time transparency is enabled/disabled. Which causes noirbuddy to go back to the default preset. In my case, I just rearranged the priorities in my config so that the transparent.nvim change happens before setting the colorscheme.
I assume the same conflict can occur with any plugin that sneakily sets the colorscheme.
@monita-hungara-13 Oh interesting, that makes a lot of sense. Priorities are going to differ based on peoples' varying plugin setups, so maybe I should document this somehow. Thanks for reporting back on this btw!
PS. Not totally relevant, but what OS are you on? @n1ghtmare and I have noticed some difference between Mac and Linux for example, in regards to manually calling colorscheme
(at least on an earlier version of noirbuddy), so I'm just curious.
I use Lunarvim I had same issue, following worked for me. But reloading LunarVim causes the same problem. check this out as well.
lvim.colorscheme = "noirbuddy"
require('noirbuddy').setup {
preset = 'miami-nights',
}
lvim.plugins = {
{
'jesseleite/nvim-noirbuddy',
dependencies = {
{ 'tjdevries/colorbuddy.nvim' }
},
lazy = true,
opts = {
preset = 'miami-nights',
},
}
}
Although this is not the correct solution, I found this to work with LazyVim:
return {
{
"jesseleite/nvim-noirbuddy",
dependencies = {
{ "tjdevries/colorbuddy.nvim" },
},
lazy = false,
priority = 1000,
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = function()
require("noirbuddy").setup({
-- Options here:
preset = "crt-green",
})
end,
},
},
}
Also, calling set background=dark|light
resets the colors to noirbuddy defaults, so your config should not set background
.
Using plain lazy.nvim
(not the LazyVim) distro, I find it necessary to :Lazy reload nvim-noirbuddy
manually after launching nvim. Might anyone know why? Here is my spec:
return {
'jesseleite/nvim-noirbuddy',
dependencies = {
{ 'tjdevries/colorbuddy.nvim' },
},
lazy = false,
priority = 1000,
opts = {
preset = 'crt-green',
},
init = function()
vim.cmd.colorscheme 'noirbuddy'
end,
}
@yrammos
Using plain
lazy.nvim
(not the LazyVim) distro, I find it necessary to:Lazy reload nvim-noirbuddy
manually after launching nvim. Might anyone know why? Here is my spec:return { 'jesseleite/nvim-noirbuddy', dependencies = { { 'tjdevries/colorbuddy.nvim' }, }, lazy = false, priority = 1000, opts = { preset = 'crt-green', }, init = function() vim.cmd.colorscheme 'noirbuddy' end, }
removing vim.cmd.colorscheme 'noirbuddy'
should solve the problem
So I think @chiefnoah found out the issue and we added a notice to the readme, https://github.com/jesseleite/nvim-noirbuddy/pull/17
Can you guys check and see if following the notice solves your issue?
I was able to get around it with the following configuration:
local noiropts = {
preset = "miami-nights",
}
return {
{
"jesseleite/nvim-noirbuddy",
lazy = false,
dependencies = {
{ "tjdevries/colorbuddy.nvim" },
},
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = function()
require("noirbuddy").setup(noiropts)
end,
},
},
}
The point is to pass a function that calls require("noirbuddy").setup(opts) as the colorscheme for LazyVim, instead of just setting it to a string. I don't know if it really changes anything, but I also explicitly disable TokyoNight elsewhere in my config.
So lazyvim uses the tokyonight by default and when i disabled tokyonight and use noirbuddy instead the problem is that i can not make lazyvim use the preset.
how do i tell lazyvim to use the
miami-nights
preset?thank you beforehand for any help