From b72a5c2dfa3e6e096b85cf64990aade56e50435c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 11 Oct 2023 14:26:16 +0200 Subject: [PATCH] fix(lualine): when opening nvim with a file, show an empty statusline till lualine loads --- lua/lazyvim/plugins/ui.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 9cb5237b..3259b4eb 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -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