theme.lua 1.1 KB

1234567891011121314151617181920212223242526
  1. require('onedark').setup {
  2. style = 'cool', -- 'cool' or 'vibrant' are usually better for TS
  3. transparent = false,
  4. term_colors = true,
  5. -- Remove overrides to use theme defaults
  6. code_style = {
  7. comments = 'italic',
  8. },
  9. }
  10. require('onedark').load()
  11. -- Force colors for diagnostics and spell check underlines ONLY
  12. vim.api.nvim_set_hl(0, 'DiagnosticUnderlineError', { undercurl = true, sp = '#ff0000' })
  13. vim.api.nvim_set_hl(0, 'DiagnosticUnderlineWarn', { undercurl = true, sp = '#ff8800' })
  14. vim.api.nvim_set_hl(0, 'SpellBad', { undercurl = true, sp = '#ffff00' })
  15. vim.api.nvim_set_hl(0, 'SpellCap', { undercurl = true, sp = '#ffff00' })
  16. vim.api.nvim_set_hl(0, 'SpellLocal', { undercurl = true, sp = '#ffff00' })
  17. vim.api.nvim_set_hl(0, 'SpellRare', { undercurl = true, sp = '#ffff00' })
  18. -- GitSigns
  19. vim.api.nvim_set_hl(0, 'GitSignsAdd', { fg = '#98c379', bg = '#2e3f34' })
  20. vim.api.nvim_set_hl(0, 'GitSignsChange', { fg = '#e5c07b', bg = '#3e3d32' })
  21. vim.api.nvim_set_hl(0, 'GitSignsDelete', { fg = '#e06c75', bg = '#3f2e2e' })
  22. vim.g.airline_theme = 'onedark'
  23. vim.opt.background = 'dark'