From b1b48be6009632badc59e99e3683f91634cab754 Mon Sep 17 00:00:00 2001 From: max397574 Date: Mon, 6 Dec 2021 20:56:22 +0100 Subject: feat(themes): allow setup{theme=...} --- lua/startup/init.lua | 3 +++ readme.md | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/startup/init.lua b/lua/startup/init.lua index 5f5d0d3..cca5755 100644 --- a/lua/startup/init.lua +++ b/lua/startup/init.lua @@ -251,6 +251,9 @@ function startup.display() startup_nvim_displayed = true local padding_nr = 1 utils.set_buf_options() + if settings.theme then + settings = vim.tbl_deep_extend("force", settings, utils.load_theme(settings.theme) or {}) + end local parts = settings.parts vim.cmd([[hi link StartupFoldedSection Special]]) for _, part in ipairs(parts) do diff --git a/readme.md b/readme.md index 941400b..c732258 100644 --- a/readme.md +++ b/readme.md @@ -58,10 +58,10 @@ The file has to return settings. For one of the default themes this can be done like this: (example with the startify theme) ```lua -local settings = require"startup.themes.startify" - -return settings + require"startup".setup({theme = "evil"}) ``` +This searches for themes in lua/startup/themes. +You can also put your own themes in there or override one of the default themes. These themes are currently available: -- cgit v1.2.3