fix(lualine): when opening nvim with a file, show an empty statusline till lualine loads

This commit is contained in:
Folke Lemaitre
2023-10-11 14:26:16 +02:00
parent 704e85183b
commit b72a5c2dfa

View File

@ -101,7 +101,13 @@ return {
event = "VeryLazy",
init = function()
vim.g.lualine_laststatus = vim.o.laststatus
vim.o.laststatus = 0
if vim.fn.argc(-1) > 0 then
-- set an empty statusline till lualine loads
vim.o.statusline = " "
else
-- hide the statusline on the starter page
vim.o.laststatus = 0
end
end,
opts = function()
local icons = require("lazyvim.config").icons