Skip to content

Commit 86ff391

Browse files
committed
plugins/dashboard: better rawLua support for header
1 parent 060f4b4 commit 86ff391

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

plugins/by-name/dashboard/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ helpers.neovim-plugin.mkNeovimPlugin {
246246
};
247247

248248
header =
249-
helpers.defaultNullOpts.mkListOf types.str
249+
helpers.defaultNullOpts.mkNullableWithRaw (with types; either str (listOf (maybeRaw str)))
250250
[
251251
""
252252
" ██████╗ █████╗ ███████╗██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ ██████╗ "

tests/test-sources/plugins/by-name/dashboard/default.nix

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,50 @@
203203
};
204204
};
205205
};
206+
207+
header-raw = {
208+
plugins.dashboard = {
209+
enable = true;
210+
211+
settings.config.header.__raw = ''
212+
function()
213+
return {
214+
"",
215+
" ██████╗ █████╗ ███████╗██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ ██████╗ ",
216+
" ██╔══██╗██╔══██╗██╔════╝██║ ██║██╔══██╗██╔═══██╗██╔══██╗██╔══██╗██╔══██╗ ",
217+
" ██║ ██║███████║███████╗███████║██████╔╝██║ ██║███████║██████╔╝██║ ██║ ",
218+
" ██║ ██║██╔══██║╚════██║██╔══██║██╔══██╗██║ ██║██╔══██║██╔══██╗██║ ██║ ",
219+
" ██████╔╝██║ ██║███████║██║ ██║██████╔╝╚██████╔╝██║ ██║██║ ██║██████╔╝ ",
220+
" ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ",
221+
""
222+
}
223+
end
224+
'';
225+
};
226+
};
227+
228+
header-line-raw = {
229+
plugins.dashboard = {
230+
enable = true;
231+
232+
settings.config.header = [
233+
{
234+
__raw = ''
235+
function()
236+
return {
237+
"",
238+
" ██████╗ █████╗ ███████╗██╗ ██╗██████╗ ██████╗ █████╗ ██████╗ ██████╗ ",
239+
" ██╔══██╗██╔══██╗██╔════╝██║ ██║██╔══██╗██╔═══██╗██╔══██╗██╔══██╗██╔══██╗ ",
240+
" ██║ ██║███████║███████╗███████║██████╔╝██║ ██║███████║██████╔╝██║ ██║ ",
241+
" ██║ ██║██╔══██║╚════██║██╔══██║██╔══██╗██║ ██║██╔══██║██╔══██╗██║ ██║ ",
242+
" ██████╔╝██║ ██║███████║██║ ██║██████╔╝╚██████╔╝██║ ██║██║ ██║██████╔╝ ",
243+
" ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ",
244+
""
245+
}
246+
end
247+
'';
248+
}
249+
];
250+
};
251+
};
206252
}

0 commit comments

Comments
 (0)