mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-03 22:14:39 +02:00
fix(lualine): only show statusline as soon as lualine loads
This commit is contained in:
parent
838ce85ad6
commit
dd55cbdc99
2 changed files with 12 additions and 10 deletions
|
@ -18,6 +18,11 @@ return {
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
theme = "doom",
|
theme = "doom",
|
||||||
|
hide = {
|
||||||
|
-- this is taken care of by lualine
|
||||||
|
-- enabling this messes up the actual laststatus setting after loading a file
|
||||||
|
statusline = false,
|
||||||
|
},
|
||||||
config = {
|
config = {
|
||||||
header = vim.split(logo, "\n"),
|
header = vim.split(logo, "\n"),
|
||||||
center = {
|
center = {
|
||||||
|
@ -52,6 +57,7 @@ return {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
@ -99,10 +99,16 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
init = function()
|
||||||
|
vim.g.lualine_laststatus = vim.o.laststatus
|
||||||
|
vim.o.laststatus = 0
|
||||||
|
end,
|
||||||
opts = function()
|
opts = function()
|
||||||
local icons = require("lazyvim.config").icons
|
local icons = require("lazyvim.config").icons
|
||||||
local Util = require("lazyvim.util")
|
local Util = require("lazyvim.util")
|
||||||
|
|
||||||
|
vim.o.laststatus = vim.g.lualine_laststatus
|
||||||
|
|
||||||
return {
|
return {
|
||||||
options = {
|
options = {
|
||||||
theme = "auto",
|
theme = "auto",
|
||||||
|
@ -327,8 +333,6 @@ return {
|
||||||
return dashboard
|
return dashboard
|
||||||
end,
|
end,
|
||||||
config = function(_, dashboard)
|
config = function(_, dashboard)
|
||||||
local laststatus = vim.o.laststatus
|
|
||||||
vim.o.laststatus = 0
|
|
||||||
-- close Lazy and re-open when the dashboard is ready
|
-- close Lazy and re-open when the dashboard is ready
|
||||||
if vim.o.filetype == "lazy" then
|
if vim.o.filetype == "lazy" then
|
||||||
vim.cmd.close()
|
vim.cmd.close()
|
||||||
|
@ -341,14 +345,6 @@ return {
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufUnload", {
|
|
||||||
once = true,
|
|
||||||
buffer = vim.api.nvim_get_current_buf(),
|
|
||||||
callback = function()
|
|
||||||
vim.opt.laststatus = laststatus
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
require("alpha").setup(dashboard.opts)
|
require("alpha").setup(dashboard.opts)
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("User", {
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue