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

32 lines
727 B
Lua
Raw Permalink Normal View History

local data_exists, custom_dasboard = pcall(require, "core.config")
2023-01-25 16:53:42 +07:00
if data_exists then
local model = custom_dasboard.model
if model ~= nil then
if model == 1 then
2023-02-15 20:00:17 +07:00
require("user.startify")
else
require("user.dashboard")
2023-01-25 16:53:42 +07:00
end
else
require("user.startify")
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,
})