dracula.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. -- Dracula 主题配置
  2. -- 支持多种变体: dracula, dracula-soft, day
  3. local M = {}
  4. M.config = function(style)
  5. local opts = {
  6. -- 主题变体: dracula, dracula-soft, day
  7. theme = style or 'dracula',
  8. -- 透明背景
  9. transparent_bg = false,
  10. -- 斜体注释
  11. italic_comment = true,
  12. -- 显示文件末尾的 ~ 符号
  13. show_end_of_buffer = true,
  14. -- Lualine 背景色
  15. lualine_bg_color = '#44475a',
  16. }
  17. -- 高级自定义选项(可选)
  18. if style == 'soft' then
  19. opts.colors = {
  20. -- 更柔和的背景色
  21. bg = '#21222c',
  22. fg = '#f8f8f2',
  23. }
  24. elseif style == 'day' then
  25. opts.colors = {
  26. -- 浅色主题配色
  27. bg = '#f8f8f2',
  28. fg = '#282a36',
  29. }
  30. end
  31. return opts
  32. end
  33. -- 主题信息
  34. M.info = {
  35. name = 'dracula',
  36. plugin = 'Mofiqul/dracula.nvim',
  37. variants = {
  38. { name = 'dracula', desc = '经典深色主题' },
  39. { name = 'dracula-soft', desc = '柔和深色主题' },
  40. { name = 'day', desc = '浅色主题' },
  41. },
  42. features = {
  43. '支持透明背景',
  44. '斜体注释',
  45. '完整的 LSP 和 Treesitter 支持',
  46. 'Lualine 主题集成',
  47. '多插件支持(Telescope, NvimTree 等)',
  48. }
  49. }
  50. return M