Open ChrisMGeo opened 2 years ago
i'm not totally sure what you mean, something like this?
alpha.setup {
layout = {
{ type = "text", val = someAsciiArt, opts = { position = "center" } },
}
}
ohhh like a background or something. interesting. i'll give it a shot at some point
I was just thinking about this... How would one start on this? I am interested in doing a PR. But it sounds a bit impossible... First of all is it possible to put the ascii art behind the MRU/Dashboard lists? Would be interested in discussing this.
probably a new element for writing virtual text is the approach I would take
trying to experiment this but i can't get the virtual text to actually draw... maybe someone else will have better luck or I'll get to this some other time
function layout_element.virtual_text(el, conf, state)
local ns = state.vt_ns
if ns == nil then
ns = vim.api.nvim_create_namespace('alpha')
state.vt_ns = ns
end
local opts = vim.tbl_extend("keep", el.opts or {}, {
virt_text = el.val,
virt_text_pos = 'overlay',
virt_text_win_col = 10,
virt_text_hide = false,
})
vim.api.nvim_buf_set_mark(state.buffer, 'a', el.line(state.line), el.col, opts)
return {}, {}
end
Sometimes I want to keep larger ASCII art as the header on the home page, but due to how the header is just on top of the options like new file, recent, etc. It doesn't look as good as I'd want it to. A solution to this would be to render the header on the entire full page and not on top of the options and render the options over it and make this an additional feature to enable in the user/init.lua and not a default.