onedark.vim 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. " [onedark.vim](https://github.com/joshdick/onedark.vim/)
  2. " This is a [lightline.vim](https://github.com/itchyny/lightline.vim) colorscheme for use with
  3. " the [onedark.vim](https://github.com/joshdick/onedark.vim) colorscheme.
  4. let s:colors = onedark#GetColors()
  5. if get(g:, 'onedark_termcolors', 256) == 16
  6. let s:term_red = s:colors.red.cterm16
  7. let s:term_green = s:colors.green.cterm16
  8. let s:term_yellow = s:colors.yellow.cterm16
  9. let s:term_blue = s:colors.blue.cterm16
  10. let s:term_purple = s:colors.purple.cterm16
  11. let s:term_white = s:colors.white.cterm16
  12. let s:term_cursor_grey = s:colors.cursor_grey.cterm16
  13. let s:term_visual_grey = s:colors.visual_grey.cterm16
  14. else
  15. let s:term_red = s:colors.red.cterm
  16. let s:term_green = s:colors.green.cterm
  17. let s:term_yellow = s:colors.yellow.cterm
  18. let s:term_blue = s:colors.blue.cterm
  19. let s:term_purple = s:colors.purple.cterm
  20. let s:term_white = s:colors.white.cterm
  21. let s:term_cursor_grey = s:colors.cursor_grey.cterm
  22. let s:term_visual_grey = s:colors.visual_grey.cterm
  23. endif
  24. let s:red = [ s:colors.red.gui, s:term_red ]
  25. let s:green = [ s:colors.green.gui, s:term_green ]
  26. let s:yellow = [ s:colors.yellow.gui, s:term_yellow ]
  27. let s:blue = [ s:colors.blue.gui, s:term_blue ]
  28. let s:purple = [ s:colors.purple.gui, s:term_purple ]
  29. let s:white = [ s:colors.white.gui, s:term_white ]
  30. let s:cursor_grey = [ s:colors.cursor_grey.gui, s:term_cursor_grey ]
  31. let s:visual_grey = [ s:colors.visual_grey.gui, s:term_visual_grey ]
  32. let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
  33. let s:p.normal.left = [ [ s:cursor_grey, s:green ], [ s:white, s:visual_grey ] ]
  34. let s:p.normal.right = [ [ s:cursor_grey, s:green ], [ s:white, s:visual_grey ] ]
  35. let s:p.inactive.left = [ [ s:white, s:visual_grey ], [ s:white, s:visual_grey ] ]
  36. let s:p.inactive.right = [ [ s:cursor_grey, s:white ], [ s:cursor_grey, s:white ] ]
  37. let s:p.insert.left = [ [ s:cursor_grey, s:blue ], [ s:white, s:visual_grey ] ]
  38. let s:p.insert.right = [ [ s:cursor_grey, s:blue ], [ s:white, s:visual_grey ] ]
  39. let s:p.replace.left = [ [ s:cursor_grey, s:red ], [ s:white, s:visual_grey ] ]
  40. let s:p.replace.right = [ [ s:cursor_grey, s:red ], [ s:white, s:visual_grey ] ]
  41. let s:p.visual.left = [ [ s:cursor_grey, s:purple ], [ s:white, s:visual_grey ] ]
  42. let s:p.visual.right = [ [ s:cursor_grey, s:purple ], [ s:white, s:visual_grey ] ]
  43. let s:p.normal.middle = [ [ s:white, s:cursor_grey ] ]
  44. let s:p.inactive.middle = [ [ s:white, s:visual_grey ] ]
  45. let s:p.tabline.left = [ [ s:white, s:visual_grey ] ]
  46. let s:p.tabline.tabsel = [ [ s:cursor_grey, s:white ] ]
  47. let s:p.tabline.middle = [ [ s:white, s:cursor_grey ] ]
  48. let s:p.tabline.right = [ [ s:white, s:visual_grey ] ]
  49. let s:p.normal.error = [ [ s:cursor_grey, s:red ] ]
  50. let s:p.normal.warning = [ [ s:cursor_grey, s:yellow ] ]
  51. let g:lightline#colorscheme#onedark#palette = lightline#colorscheme#flatten(s:p)