2024-05-21 14:20:50 +07:00
|
|
|
local model = vim.g.pcode_model
|
|
|
|
if model ~= nil then
|
2024-06-14 08:40:35 +07:00
|
|
|
if model == 1 then
|
|
|
|
require("user.startify")
|
|
|
|
else
|
|
|
|
require("user.dashboard")
|
|
|
|
end
|
2023-02-15 20:00:17 +07:00
|
|
|
else
|
2024-06-14 08:40:35 +07:00
|
|
|
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", {
|
2024-06-14 08:40:35 +07:00
|
|
|
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,
|
2023-03-08 13:52:16 +07:00
|
|
|
})
|