pojokcodeid.nvim-lazy/lua/user/alpha.lua

27 lines
586 B
Lua
Raw Normal View History

2024-05-21 14:20:50 +07:00
local model = vim.g.pcode_model
if model ~= nil then
if model == 1 then
require("user.startify")
2024-05-21 14:20:50 +07:00
else
require("user.dashboard")
2023-01-25 16:53:42 +07:00
end
2023-02-15 20:00:17 +07:00
else
require("user.startify")
2023-01-24 20:58:38 +07:00
end
2023-03-08 13:52:16 +07:00
-- Disable statusline in dashboard
vim.api.nvim_create_autocmd("FileType", {
pattern = "alpha",
callback = function()
-- store current statusline value and use that
local old_laststatus = vim.opt.laststatus
vim.api.nvim_create_autocmd("BufUnload", {
buffer = 0,
callback = function()
vim.opt.laststatus = old_laststatus
end,
})
vim.opt.laststatus = 0
end,
})