theme.lua 2.9 KB

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