nvim

neovim config
git clone _git@git.tontus.eu/nvim.git
Log | Files | Refs | README

barbar.lua (2246B)


      1 vim.g.barbar_auto_setup = false -- disable auto-setup
      2 require("barbar").setup({
      3   animation = false,
      4 
      5   -- Enable/disable current/total tabpages indicator (top right corner)
      6   tabpages = true,
      7 
      8   -- A buffer to this direction will be focused (if it exists) when closing the current buffer.
      9   -- Valid options are 'left' (the default), 'previous', and 'right'
     10   focus_on_close = 'left',
     11 
     12   -- Hide inactive buffers and file extensions. Other options are `alternate`, `current`, and `visible`.
     13   hide = {extensions = false, inactive = false},
     14 
     15   icons = {
     16     buffer_index = false,
     17     buffer_number = false,
     18     button = '',
     19     diagnostics = {
     20       [vim.diagnostic.severity.ERROR] = {enabled = true, icon = ' '},
     21     },
     22     gitsigns = {
     23       added = {enabled = true, icon = ' '},
     24       changed = {enabled = true, icon = ' '},
     25       deleted = {enabled = true, icon = ' '},
     26     },
     27     separator = {left = '▎', right = ''},
     28 
     29     -- If true, add an additional separator at the end of the buffer list
     30     separator_at_end = true,
     31 
     32     -- Configure the icons on the bufferline when modified or pinned.
     33     -- Supports all the base icon options.
     34     modified = {button = '●'},
     35     pinned = {button = '', filename = true},
     36 
     37     -- Configure the icons on the bufferline based on the visibility of a buffer.
     38     -- Supports all the base icon options, plus `modified` and `pinned`.
     39     alternate = {filetype = {enabled = false}},
     40     current = {buffer_index = true},
     41     inactive = {button = '×'},
     42     visible = {modified = {buffer_number = false}},
     43   },
     44 
     45   sidebar_filetypes = {   -- Set the filetypes which barbar will offset itself for
     46     -- Use the default values: {event = 'BufWinLeave', text = '', align = 'left'}
     47     NvimTree = true,
     48     -- Or, specify the text used for the offset:
     49     undotree = {
     50       text = 'undotree',
     51       align = 'left', -- *optionally* specify an alignment (either 'left', 'center', or 'right')
     52     },
     53     -- Or, specify the event which the sidebar executes when leaving:
     54     ['neo-tree'] = {event = 'BufWipeout'},
     55     -- Or, specify all three
     56     Outline = {event = 'BufWinLeave', text = 'symbols-outline', align = 'right'},
     57   },
     58   maximum_length = 25, -- Sets the maximum buffer name length.
     59 })