From 90ccbc7c3d6d0bc568a98574a82e461e62b2e664 Mon Sep 17 00:00:00 2001 From: denxeiy Date: Sun, 7 Jun 2026 20:28:45 +0300 Subject: [PATCH 1/3] PR feat: created dir for custom themes, added check if theme is in custom dir, added custom dir in .gitignore --- .gitignore | 1 + lua/startup/utils.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 11270fb..70a8c56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ test notes.md +lua/startup/themes/custom diff --git a/lua/startup/utils.lua b/lua/startup/utils.lua index 9b875f6..be4c0a6 100644 --- a/lua/startup/utils.lua +++ b/lua/startup/utils.lua @@ -94,9 +94,16 @@ function U.load_theme(theme_name) local files = vim.api.nvim_get_runtime_file(path, true) local settings if #files == 0 then - path = "lua/startup/themes" .. theme_name .. "/init.lua" + -- path = "lua/startup/themes" .. theme_name .. "/init.lua" + path = "lua/startup/themes/" .. theme_name .. "/init.lua" -- PR: maybe slash is missing? files = vim.api.nvim_get_runtime_file(path, true) end + --- for PR --- + if #files == 0 then + path = "lua/startup/themes/custom/" .. theme_name .. ".lua" + files = vim.api.nvim_get_runtime_file(path, true) + end + --- for PR --- if #files == 0 then error("lua/startup/themes/" .. theme_name .. ".lua" .. " not found") elseif #files == 1 then From 3c47e2f44ca5fdda37ee5895bc3c7189127b7cb3 Mon Sep 17 00:00:00 2001 From: denxeiy <121923478+denxeiy@users.noreply.github.com> Date: Sun, 7 Jun 2026 22:49:45 +0300 Subject: [PATCH 2/3] Removed comments --- lua/startup/utils.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/startup/utils.lua b/lua/startup/utils.lua index be4c0a6..f10ae18 100644 --- a/lua/startup/utils.lua +++ b/lua/startup/utils.lua @@ -94,16 +94,13 @@ function U.load_theme(theme_name) local files = vim.api.nvim_get_runtime_file(path, true) local settings if #files == 0 then - -- path = "lua/startup/themes" .. theme_name .. "/init.lua" - path = "lua/startup/themes/" .. theme_name .. "/init.lua" -- PR: maybe slash is missing? + path = "lua/startup/themes/" .. theme_name .. "/init.lua" files = vim.api.nvim_get_runtime_file(path, true) end - --- for PR --- if #files == 0 then path = "lua/startup/themes/custom/" .. theme_name .. ".lua" files = vim.api.nvim_get_runtime_file(path, true) end - --- for PR --- if #files == 0 then error("lua/startup/themes/" .. theme_name .. ".lua" .. " not found") elseif #files == 1 then From 2221d1eb2fc45c05ddff44ce99ecd6748dbb23b0 Mon Sep 17 00:00:00 2001 From: denxeiy <121923478+denxeiy@users.noreply.github.com> Date: Sun, 7 Jun 2026 23:13:18 +0300 Subject: [PATCH 3/3] Update readme.md --- readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 17de837..8123d34 100644 --- a/readme.md +++ b/readme.md @@ -281,8 +281,9 @@ The evil theme is just a bloated theme with oldfiles, commands, additional info ### Custom theme -You can put your theme in `lua/startup/themes/my_theme.lua` +You can put your theme in `lua/startup/themes/my_theme.lua` or you can make directory in `lua/startup/themes/custom` and put your themes there to keep them untracked by git. The file has to return settings with the structure like you put them into `setup()`. + You can also overwrite a theme (e.g. `dashboard`). Just copy all the setting from it and change whatever you want. You can use some functions from `lua/startup/functions.lua` with `require("startup.functions").function_name()`.