You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this I think it will reduce the theme.lua file to simply hook up the highlight groups and change the palette variant and apply the config.theme options, so each group has it separation.
-- ./lua/cyberdream/theme.lualocalopts=config.optionslocaltheme= {}
theme.highligths=util.get_hl_groups(opts)
ifopts.hide_fillcharsthenvim.opt.fillchars:append({
horiz="",
horizup="",
horizdown="",
vert="",
vertleft="",
vertright="",
verthoriz="",
eob="",
})
elsevim.opt.fillchars:append({
eob="",
})
end-- Use #000000 for full transparencyifopts.transparentthentheme.highlights.NotifyBackground= { bg="#000000" }
endlocaloverrides=opts.theme.overridesoropts.theme.highlightsiftype(overrides) =="function" thenoverrides=overrides(t)
end-- Override highlights with user defined highlightstheme.highlights=vim.tbl_deep_extend("force", theme.highlights, overridesor {})
returntheme
Of course, util functions that I wrote in the examples had to be implemented. Or pass the opts necessary and return a table instead of a callback function
The text was updated successfully, but these errors were encountered:
I think this is something I would consider in the future. theme.lua is going to grow, that's inevitable. But for now, I think it's still within a manageable size. I have no problem grepping around the project as it stands.
I'm going to close this for now as 'won't fix' but with the intention to return and review at a later date when the theme.lua file is completely out of control 😄
Question or Suggestion
To keep better separation in the file structure I thought of something to help separate highlight groups.
# ./lua/cyberdream ├── colors.lua ├── config.lua ├── extra/ ├── init.lua ├── theme.lua ├── treesitter.lua └── util.lua
# ./lua/cyberdream ├── colors.lua ├── config.lua ├── extra/ ├── init.lua ├── groups/ ├──├──base.lua ├──├──treesitter.lua ├──├──telescope.lua ├──├──lsp.lua ├── treesitter.lua ├── theme.lua └── util.lua
With this I think it will reduce the
theme.lua
file to simply hook up the highlight groups and change the palette variant and apply theconfig.theme
options, so each group has it separation.Example:
Of course,
util
functions that I wrote in the examples had to be implemented. Or pass the opts necessary and return a table instead of a callback functionThe text was updated successfully, but these errors were encountered: