barbar.vim 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. let bufferline = {}
  2. " Show a shadow over the editor in buffer-pick mode
  3. let bufferline.shadow = v:true
  4. " Enable/disable icons
  5. let bufferline.icons = v:true
  6. " Enables/disable clickable tabs
  7. " - left-click: go to buffer
  8. " - middle-click: delete buffer
  9. "
  10. " NOTE disabled by default because this might cause E541 (too many items)
  11. " if you have many tabs open
  12. let bufferline.clickable = v:true
  13. " If set, the letters for each buffer in buffer-pick mode will be
  14. " assigned based on their name. Otherwise or in case all letters are
  15. " already assigned, the behavior is to assign letters in order of
  16. " usability (see order below)
  17. let bufferline.semantic_letters = v:true
  18. " New buffer letters are assigned in this order. This order is
  19. " optimal for the qwerty keyboard layout but might need adjustement
  20. " for other layouts.
  21. let bufferline.letters =
  22. \ 'asdfjkl;ghnmxcbziowerutyqpASDFJKLGHNMXCBZIOWERUTYQP'
  23. let bg_current = get(nvim_get_hl_by_name('Normal', 1), 'background', '#000000')
  24. let bg_visible = get(nvim_get_hl_by_name('TabLineSel', 1), 'background', '#000000')
  25. let bg_inactive = get(nvim_get_hl_by_name('TabLine', 1), 'background', '#000000')
  26. " For the current active buffer
  27. hi default link BufferCurrent Normal
  28. " For the current active buffer when modified
  29. hi default link BufferCurrentMod Normal
  30. " For the current active buffer icon
  31. hi default link BufferCurrentSign Normal
  32. " For the current active buffer target when buffer-picking
  33. exe 'hi default BufferCurrentTarget guifg=red gui=bold guibg=' . bg_current
  34. " For buffers visible but not the current one
  35. hi default link BufferVisible TabLineSel
  36. hi default link BufferVisibleMod TabLineSel
  37. hi default link BufferVisibleSign TabLineSel
  38. exe 'hi default BufferVisibleTarget guifg=red gui=bold guibg=' . bg_visible
  39. " For buffers invisible buffers
  40. hi default link BufferInactive TabLine
  41. hi default link BufferInactiveMod TabLine
  42. hi default link BufferInactiveSign TabLine
  43. exe 'hi default BufferInactiveTarget guifg=red gui=bold guibg=' . bg_inactive
  44. " For the shadow in buffer-picking mode
  45. hi default BufferShadow guifg=#000000 guibg=#000000