LazyVim / LazyVim

Neovim config for the lazy
https://lazyvim.github.io/
Apache License 2.0
16.28k stars 1.13k forks source link

bug: lualine can not be set to VeryLazy #149

Closed YangEfei closed 1 year ago

YangEfei commented 1 year ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.9.0

Operating system/version

MacOS 13.0 (22A380)

Describe the bug

I found that Lazy has loaded lualine, but it can not show in my buffer. Then I comment the line of lualine in plugins/ui.lua

  -- statusline
  {
    "nvim-lualine/lualine.nvim",
    -- event = "VeryLazy",
    ...
  }

It works correctly.

Steps To Reproduce

Open any files with nvim, there's no lualine.

Expected Behavior

The lualine should be shown after the buffer has loaded completely.

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",
  "folke/LazyVim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
folke commented 1 year ago

I can't repdoduce this with the default LazyVim settings.

Doing $ nvim foo.lua will open the file and properly show lualine.