Closed LelouchFR closed 3 months ago
You should be able to remove the \
behind each string in the header table and that should fix it. Mine for example is
header = {
" ██ █████ ███████ ██ ██ ██ ██████ ",
" ██ ██ ██ ██ ██ ██ ██ ██ ██ ",
" ██ ███████ ███████ █████ ██ ██████ ",
"██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ",
" █████ ██ ██ ███████ ██ ██ ██ ██ ██ ",
" ",
" "
},
That's not the problem. How to add colors to it, like in the preview ?
Or even how to make a command like cat ascii.txt | lolcat
and add that into the header ?
If you or anyone else can figure out how to get colors in the header, please do share, as I have also been looking for a while to see if I can figure it out, to no avail of course.
If you or anyone else can figure out how to get colors in the header, please do share, as I have also been looking for a while to see if I can figure it out, to no avail of course.
You have to put it in an external file, so that it can be run through a command that will process the colours. Here I'm using lolcrab
, but lolcat
is another command-line tool that will produce similar effects. You have to configure all this in the call to dashboard.setup
(example shown in the link).
Is it only possible in the doom theme?
Is it only possible in the doom theme?
Only one way to find out 😜 (I have no idea, try it with the other theme and see if works)
Fair enough, I'll give it a shot and post the answer here.
using LazyVim:
~/.config/nvim/lua/plugins/dashboard.lua
return {
"nvimdev/dashboard-nvim",
opts = function(_, opts)
local preview = opts.preview or {}
preview.command = "lolcrab"
preview.file_path = "~/.config/nvim/lua/plugins/dashboard.txt"
preview.file_width = 69
preview.file_height = 10
opts.preview = preview
end,
}
~/.config/nvim/lua/plugins/dashboard.txt
███████████ █████ ██
███████████ █████
████████████████ ███████████ ███ ███████
████████████████ ████████████ █████ ██████████████
██████████████████████████████ █████ █████ ████ █████
██████████████████████████████████ █████ █████ ████ █████
██████ ███ █████████████████ ████ █████ █████ ████ ██████
██████ ██ ███████████████ ██ █████████████████
██████ ██ ███████████████ ██ █████████████████
note: install lolcrab with cargo: cargo install lolcrab
Describe the bug I've been struggling to show this ascii which comes from the wiki, I tried pretty much everything I could think of, I would like to get some help on how to show ascii's and some boilerplate code (using lua) to get me out of this problem
To Reproduce
error: Erreur détectée en traitant :source (no file) :
E5107: Error loading lua [string ":source (no file)"]:95: unexpected symbol near '['
It would be cool if there was a clear tutorial about how to show it up, I've seen talk about
preview
, but no idea how and where to find it.Expected behavior The same doom config as in the demo