Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test
notes.md
lua/startup/themes/custom
6 changes: 5 additions & 1 deletion lua/startup/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ 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"
files = vim.api.nvim_get_runtime_file(path, true)
end
if #files == 0 then
path = "lua/startup/themes/custom/" .. theme_name .. ".lua"
files = vim.api.nvim_get_runtime_file(path, true)
end
if #files == 0 then
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
Expand Down