theme.lua 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. local M = {}
  2. M.config = function()
  3. lvim.builtin.theme = {
  4. name = "tokyonight",
  5. options = {
  6. on_highlights = function(hl, c)
  7. hl.IndentBlanklineContextChar = {
  8. fg = c.dark5,
  9. }
  10. hl.TSConstructor = {
  11. fg = c.blue1,
  12. }
  13. hl.TSTagDelimiter = {
  14. fg = c.dark5,
  15. }
  16. -- local prompt = "#2d3149"
  17. -- hl.TelescopeNormal = {
  18. -- bg = c.bg_dark,
  19. -- fg = c.fg_dark,
  20. -- }
  21. -- hl.TelescopeBorder = {
  22. -- bg = c.bg_dark,
  23. -- fg = c.bg_dark,
  24. -- }
  25. -- hl.TelescopePromptNormal = {
  26. -- bg = prompt,
  27. -- }
  28. -- hl.TelescopePromptBorder = {
  29. -- bg = prompt,
  30. -- fg = prompt,
  31. -- }
  32. -- hl.TelescopePromptTitle = {
  33. -- bg = prompt,
  34. -- fg = prompt,
  35. -- }
  36. -- hl.TelescopePreviewTitle = {
  37. -- bg = c.bg_dark,
  38. -- fg = c.bg_dark,
  39. -- }
  40. -- hl.TelescopeResultsTitle = {
  41. -- bg = c.bg_dark,
  42. -- fg = c.bg_dark,
  43. -- }
  44. end,
  45. style = "night", -- The theme comes in three styles, `storm`, a darker variant `night` and `day`
  46. transparent = lvim.transparent_window, -- Enable this to disable setting the background color
  47. terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
  48. styles = {
  49. -- Style to be applied to different syntax groups
  50. -- Value is any valid attr-list value for `:help nvim_set_hl`
  51. comments = { italic = true },
  52. keywords = { italic = true },
  53. functions = {},
  54. variables = {},
  55. -- Background styles. Can be "dark", "transparent" or "normal"
  56. sidebars = "dark", -- style for sidebars, see below
  57. floats = "dark", -- style for floating windows
  58. },
  59. -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
  60. sidebars = {
  61. "qf",
  62. "vista_kind",
  63. "terminal",
  64. "packer",
  65. "spectre_panel",
  66. "NeogitStatus",
  67. "help",
  68. },
  69. day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
  70. hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
  71. dim_inactive = false, -- dims inactive windows
  72. lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
  73. use_background = true, -- can be light/dark/auto. When auto, background will be set to vim.o.background
  74. },
  75. }
  76. local status_ok, theme = pcall(require, "tokyonight")
  77. if not status_ok then
  78. return
  79. end
  80. theme.setup(lvim.builtin.theme.options)
  81. end
  82. M.setup = function()
  83. local status_ok, theme = pcall(require, "tokyonight")
  84. if not status_ok then
  85. return
  86. end
  87. theme.setup(lvim.builtin.theme.options)
  88. lvim.builtin.lualine.options.theme = "tokyonight"
  89. end
  90. return M