-
Notifications
You must be signed in to change notification settings - Fork 470
Closed as not planned
Closed as not planned
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Did you check docs and existing issues?
- I have read all the lazy.nvim docs
- I have searched the existing issues of lazy.nvim
- I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.9.0
Operating system/version
6.2.12-arch1-1
Describe the bug
It seems the color of Normal
is modified temporarily after executing :Lazy build
. For example:
- in my personal colorscheme,
Normal
's background color is"#202020"
. During:Lazy build
, it is"#353535"
- in the default colorscheme,
Normal
is cleared. During:Lazy build
, the background"#ff00ff"
Steps To Reproduce
- Add a
build
hook to any plugin, e.g.:{'folke/lazy.nvim', tag = 'stable', build = function() vim.print(vim.g.colors_name, vim.api.nvim_get_hl(0, {name = 'Normal', link = false})) vim.defer_fn(function() vim.print(vim.g.colors_name, vim.api.nvim_get_hl(0, {name = 'Normal', link = false})) end, 5000) end},
- Start
nvim
, then run:hi Normal
to verify the correctNormal
highlight color. :Lazy build <plugin>
, it will print an incorrectNormal
color first then 5 seconds later it will print the correct one.
Expected Behavior
The Normal
highlight group should remain unmodified while running :Lazy build
, so that colorscheme plugins (e.g. mini.colors
) can run update hooks.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{"folke/tokyonight.nvim", build = function()
vim.cmd.colorscheme("tokyonight")
vim.print(vim.g.colors_name, vim.api.nvim_get_hl(0, {name = 'Normal', link = false}))
vim.defer_fn(function() vim.print(vim.g.colors_name, vim.api.nvim_get_hl(0, {name = 'Normal', link = false})) end, 5000)
end},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working