NVIM LUAU

Awesome plugins for Neovim

GitHubAdd Plugin

    Tabline

  • akinsho/bufferline.nvim
    944

    A snazzy bufferline for Neovim

  • crispgm/nvim-tabline
    19

    nvim port of tabline.vim with Lua

  • koenverburg/minimal-tabline.nvim
    2

    A minimal tabline, that's it

  • nanozuki/tabby.nvim
    381

    A declarative, highly configurable, and neovim style tabline plugin. Use your nvim tabs as a workspace multiplexer!

  • noib3/nvim-cokeline
    169

    :nose: A Neovim bufferline for people with addictive personalities

  • romgrk/barbar.nvim
    899

    The neovim tabline plugin.

  • Status Line

  • alvarosevilla95/luatab.nvim
    109

    Tabline lua plugin for neovim

  • b0o/incline.nvim
    105

    🎈 Floating statuslines for Neovim

  • datwaft/bubbly.nvim
    167

    Bubbly statusline for neovim

  • feline-nvim/feline.nvim
    564

    A minimal, stylish and customizable statusline for Neovim written in Lua

  • konapun/vacuumline.nvim
    17

    A prebuilt configuration for galaxyline inspired by airline

  • NTBBloodbath/galaxyline.nvim
    118

    neovim statusline plugin written in lua

  • nvim-lualine/lualine.nvim
    1434

    A blazing fast and easy to configure neovim statusline plugin written in pure lua.

  • rebelot/heirline.nvim
    208

    Heirline.nvim is a no-nonsense Neovim Statusline plugin designed around recursive inheritance to be exceptionally fast and versatile.

  • tamton-aquib/staline.nvim
    138

    A modern lightweight statusline and bufferline for neovim in lua. Mainly uses unicode symbols for showing info.

  • windwp/windline.nvim
    280

    Animation statusline, floating window statusline. Use lua + luv make some wind

  • Keybinding

  • b0o/mapx.nvim
    141

    🗺 A better way to create key mappings in Neovim.

  • folke/which-key.nvim
    1189

    💥 Create key bindings that stick. WhichKey is a lua plugin for Neovim 0.5 that displays a popup with possible keybindings of the command you started typing.

  • mrjones2014/legendary.nvim
    210

    🗺️ A legend for your keymaps, commands, and autocmds, with which-key.nvim integration (requires Neovim nightly)

  • simrat39/rust-tools.nvim
    684

    Tools for better development in rust using neovim's builtin lsp

  • LSP

  • b0o/SchemaStore.nvim
    159

    🛍 JSON schemas for Neovim

  • folke/trouble.nvim
    1388

    🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.

  • jose-elias-alvarez/nvim-lsp-ts-utils
    373

    Utilities to improve the TypeScript development experience for Neovim's built-in LSP client.

  • neovim/nvim-lspconfig
    3936

    Quickstart configurations for the Nvim LSP client

  • nvim-lua/lsp_extensions.nvim
    193

    Repo to hold a bunch of info & extension callbacks for built-in LSP. Use at your own risk :wink:

  • nvim-lua/lsp-status.nvim
    426

    Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline

  • ray-x/navigator.lua
    572

    Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.

  • williamboman/nvim-lsp-installer
    1157

    Neovim plugin that allows you to seamlessly manage LSP servers with :LspInstall. With full Windows support!

  • Guides

  • bennypowers/nvim-regexplainer
    183

    Describe the regexp under the cursor

  • nvim-lua/kickstart.nvim
    2356

    A launch point for your personal nvim configuration

  • Colorschemes

  • catppuccin/nvim
    546

    🍨 Soothing pastel theme for NeoVim

  • dharmx/nvim-colo
    26

    Theming utlilities for neovim. This is very experimental at the moment.

  • ful1e5/onedark.nvim
    174

    Atom's iconic One Dark theme for Neovim, written in Lua

  • HUAHUAI23/nvim-quietlight
    0

    A theme for Neovim with support for LSP, Treesitter, and more.

  • kvrohit/substrata.nvim
    56

    A cold, dark color scheme for Neovim

  • lalitmee/cobalt2.nvim
    7

    cobalt2 theme for neovim in Lua using colorbuddy

  • luisiacc/gruvbox-baby
    42

    Gruvbox theme for neovim with full 🎄TreeSitter support.

  • mhartington/oceanic-next
    986

    Oceanic Next theme for neovim

  • Mofiqul/adwaita.nvim
    38

    Neovim colorscheme using Gnome Adwaita syntax

  • Mofiqul/dracula.nvim
    123

    Dracula colorscheme for neovim written in Lua

  • mrjones2014/lighthaus.nvim
    40

    A Lua implementation of lighthaus-theme/vim-lighthaus

  • navarasu/onedark.nvim
    270

    One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles

  • NTBBloodbath/doom-one.nvim
    74

    doom-emacs' doom-one Lua port for Neovim

  • rebelot/kanagawa.nvim
    738

    NeoVim dark colorscheme inspired by the colors of the famous painting by Katsushika Hokusai.

  • rose-pine/neovim
    310

    Soho vibes for Neovim

  • RRethy/nvim-base16
    301

    Neovim plugin for building a sync base16 colorscheme. Includes support for Treesitter and LSP highlight groups.

  • sunjon/Shade.nvim
    374

    An Nvim lua plugin that dims your inactive windows

  • themercorp/themer.lua
    130

    A simple, minimal highlighter plugin for neovim

  • zanglg/nova.nvim
    82

    Another color scheme for neovim written in lua, WIP

  • Comment

  • danymat/neogen
    373

    A better annotation generator. Supports multiple languages and annotation conventions.

  • Utility

  • echasnovski/mini.nvim
    405

    Neovim plugin with collection of minimal, independent, and fast Lua modules dedicated to improve Neovim (version 0.5 and higher) experience

  • hood/popui.nvim
    42

    NeoVim UI sweetness powered by popfix.

  • meznaric/conmenu
    21

  • mrjones2014/dash.nvim
    132

    🏃💨 Search Dash.app from your Neovim fuzzy finder. Built with Rust 🦀 and Lua

  • Cursor Line

  • edluffy/specs.nvim
    233

    👓 A fast and lightweight Neovim lua plugin to keep an eye on where your cursor has jumped.

  • mg979/vim-visual-multi
    2046

    Multiple cursors plugin for vim/neovim

  • Code Runner

  • FeiyouG/command_center.nvim
    57

    Create and manage keybindings and commands in a more organized manner, and search them quickly through Telescope

  • Extras

  • folke/zen-mode.nvim
    377

    🧘 Distraction-free coding for Neovim

  • goolord/alpha-nvim
    322

    a lua powered greeter like vim-startify / dashboard-nvim

  • Start Up

  • henriquehbr/nvim-startup.lua
    45

    Displays neovim startup time

  • lewis6991/impatient.nvim
    563

    Improve startup time for Neovim

  • Session

  • HUAHUAI23/telescope-session.nvim
    12

    manage your vim session with telescope 🔭

  • Fuzzy Finder

  • ibhagwan/fzf-lua
    418

    Improved fzf.vim written in lua

  • nvim-telescope/telescope.nvim
    5023

    Find, Filter, Preview, Pick. All lua, all the time.

  • vijaymarupudi/nvim-fzf
    223

    A Lua API for using fzf in neovim.

  • Misc

  • iggredible/Learn-Vim
    9061

    Learning Vim and Vimscript doesn't have to be hard. This is the guide that you're looking for 📖

  • m-demare/attempt.nvim
    53

    Manage temporary buffers

  • SmiteshP/nvim-gps
    348

    Simple statusline component that shows what scope you are working inside

  • windwp/nvim-autopairs
    1479

    autopairs for neovim written by lua

  • zegervdv/nrpattern.nvim
    43

    Neovim plugin to expand incrementing/decrementing to more formats.

  • Note Taking

  • jakewvincent/mkdnflow.nvim
    97

    Tools for markdown notebook navigation and management

  • nvim-neorg/neorg
    2078

    Modernity meets insane extensibility. The future of organizing your life in Neovim.

  • Motion

  • jinh0/eyeliner.nvim
    170

    👀 Move faster with unique f/F indicators.

  • Terminal Integration

  • jlesquembre/nterm.nvim
    35

    neovim plugin to interact with the terminal

  • Scrolling

  • karb94/neoscroll.nvim
    765

    Smooth scrolling neovim plugin written in lua

  • Git

  • kdheepak/lazygit.nvim
    313

    Plugin for calling lazygit from within neovim.

  • zegervdv/settle.nvim
    0

    Settle your merge conflicts from Neovim

  • File Explorer

  • kevinhwang91/rnvimr
    451

    Make Ranger running in a floating window to communicate with Neovim via RPC

  • kyazdani42/nvim-tree.lua
    2040

    A file explorer tree for neovim written in lua

  • Snippets

  • L3MON4D3/LuaSnip
    692

    Snippet Engine for Neovim written in Lua.

  • Browser Integration

  • lalitmee/browse.nvim
    0

    browse for anything using your choice of method

  • Indent

  • lukas-reineke/indent-blankline.nvim
    1272

    Indent guides for Neovim

  • Formatting

  • lukas-reineke/lsp-format.nvim
    248

    A wrapper around Neovims native LSP formatting.

  • Syntax

  • m-demare/hlargs.nvim/
    30

    Highlight arguments' definitions and usages, using Treesitter

  • Splits and Window

  • mrjones2014/smart-splits.nvim
    83

    🧠 Smart, directional Neovim split resizing and navigation. Think about resizing splits in terms of "move the divider to the left/right/up/down".

  • Completion

  • noib3/nvim-compleet
    413

    :zap: An async autocompletion framework for Neovim

  • zbirenbaum/copilot-cmp
    69

    Lua plugin to turn github copilot into a cmp source

  • zbirenbaum/copilot.lua
    100

    Lua plugin for starting and interacting with github copilot

  • Package Managers

  • NTBBloodbath/cheovim
    145

    Neovim configuration switcher written in Lua. Inspired by chemacs.

  • savq/paq-nvim
    408

    🌚 Neovim package manager

  • wbthomason/packer.nvim
    2321

    A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config

  • Game

  • ThePrimeagen/vim-be-good
    619

    vim-be-good is a nvim plugin designed to make you better at Vim Movements.

https://github.com/romgrk/barbar.nvim

demo

barbar.nvim is a tabline plugin with re-orderable, auto-sizing, clickable tabs, icons, nice highlighting, sort-by commands and a magic jump-to-buffer mode. Plus the tab names are made unique when two filenames match.

In jump-to-buffer mode, tabs display a target letter instead of their icon. Jump to any buffer by simply typing their target letter. Even better, the target letter stays constant for the lifetime of the buffer, so if you're working with a set of files you can even type the letter ahead from memory.

Table of content
  • Install
  • Features
  • Usage
  • Options
  • Highlighting
  • Integrations
  • Known Issues
  • About Barbar

Install

Requirements:

  • Neovim v0.7+

Optional Requirements:

  • File icons: nvim-web-devicons
    • NOTE: Requires a nerd font by default. Can be configured to remove this requirement.
  • Git integration: gitsigns.nvim

Using lazy.nvim

require('lazy').setup {
  {'romgrk/barbar.nvim',
    dependencies = {
      'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
      'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
    },
    init = function() vim.g.barbar_auto_setup = false end,
    opts = {
      -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
      -- animation = true,
      -- insert_at_start = true,
      -- …etc.
    },
    version = '^1.0.0', -- optional: only update when a new 1.x version is released
  },
}

Using packer.nvim

-- These optional plugins should be loaded directly because of a bug in Packer lazy loading
use 'nvim-tree/nvim-web-devicons' -- OPTIONAL: for file icons
use 'lewis6991/gitsigns.nvim' -- OPTIONAL: for git status
use 'romgrk/barbar.nvim'

Using vim-plug

Plug 'lewis6991/gitsigns.nvim' " OPTIONAL: for git status
Plug 'nvim-tree/nvim-web-devicons' " OPTIONAL: for file icons
Plug 'romgrk/barbar.nvim'

Features

Re-order tabs

reorder

Auto-sizing tabs, fill the space when available

resize

Jump-to-buffer mode

jump

Type a letter to jump to a buffer. Letters stay constant for the lifetime of the buffer. By default, letters are assigned based on buffer name, eg README.md will get letter r. You can change this so that letters are assigned based on usability: home row (asdfjkl;gh) first, then other rows.

Sort tabs automatically

jump

:BufferOrderByDirectory, :BufferOrderByLanguage, :BufferOrderByWindowNumber, :BufferOrderByBufferNumber

Clickable & closable tabs

click

Left-click to go, middle-click or close button to close. Don't forget to set mouse+=a.

Unique names when filenames match

unique-name

Pinned buffers

pinned

bbye.vim for closing buffers

A modified version of bbye.vim is included in this plugin to close buffers without messing with your window layout and more. Available as BufferClose and bufferline#bbye#delete(buf).

Scrollable tabs, to always show the current buffer

scroll

Offset bufferline when showing sidebars

filetree-with-offset

Usage

Mappings & commands

Vim script

No default mappings are provided, here is an example. It is recommended to use the BufferClose command to close buffers instead of bdelete because it will not mess your window layout.

" Move to previous/next
nnoremap <silent>    <A-,> <Cmd>BufferPrevious<CR>
nnoremap <silent>    <A-.> <Cmd>BufferNext<CR>

" Re-order to previous/next
nnoremap <silent>    <A-<> <Cmd>BufferMovePrevious<CR>
nnoremap <silent>    <A->> <Cmd>BufferMoveNext<CR>

" Goto buffer in position...
nnoremap <silent>    <A-1> <Cmd>BufferGoto 1<CR>
nnoremap <silent>    <A-2> <Cmd>BufferGoto 2<CR>
nnoremap <silent>    <A-3> <Cmd>BufferGoto 3<CR>
nnoremap <silent>    <A-4> <Cmd>BufferGoto 4<CR>
nnoremap <silent>    <A-5> <Cmd>BufferGoto 5<CR>
nnoremap <silent>    <A-6> <Cmd>BufferGoto 6<CR>
nnoremap <silent>    <A-7> <Cmd>BufferGoto 7<CR>
nnoremap <silent>    <A-8> <Cmd>BufferGoto 8<CR>
nnoremap <silent>    <A-9> <Cmd>BufferGoto 9<CR>
nnoremap <silent>    <A-0> <Cmd>BufferLast<CR>

" Pin/unpin buffer
nnoremap <silent>    <A-p> <Cmd>BufferPin<CR>

" Close buffer
nnoremap <silent>    <A-c> <Cmd>BufferClose<CR>
" Restore buffer
nnoremap <silent>    <A-s-c> <Cmd>BufferRestore<CR>

" Wipeout buffer
"                          :BufferWipeout
" Close commands
"                          :BufferCloseAllButCurrent
"                          :BufferCloseAllButVisible
"                          :BufferCloseAllButPinned
"                          :BufferCloseAllButCurrentOrPinned
"                          :BufferCloseBuffersLeft
"                          :BufferCloseBuffersRight

" Magic buffer-picking mode
nnoremap <silent> <C-p>    <Cmd>BufferPick<CR>
nnoremap <silent> <C-p>    <Cmd>BufferPickDelete<CR>

" Sort automatically by...
nnoremap <silent> <Space>bb <Cmd>BufferOrderByBufferNumber<CR>
nnoremap <silent> <Space>bd <Cmd>BufferOrderByDirectory<CR>
nnoremap <silent> <Space>bl <Cmd>BufferOrderByLanguage<CR>
nnoremap <silent> <Space>bw <Cmd>BufferOrderByWindowNumber<CR>

" Other:
" :BarbarEnable - enables barbar (enabled by default)
" :BarbarDisable - very bad command, should never be used

Lua

local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }

-- Move to previous/next
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
-- Re-order to previous/next
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
-- Goto buffer in position...
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
-- Pin/unpin buffer
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
-- Close buffer
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
-- Wipeout buffer
--                 :BufferWipeout
-- Close commands
--                 :BufferCloseAllButCurrent
--                 :BufferCloseAllButPinned
--                 :BufferCloseAllButCurrentOrPinned
--                 :BufferCloseBuffersLeft
--                 :BufferCloseBuffersRight
-- Magic buffer-picking mode
map('n', '<C-p>', '<Cmd>BufferPick<CR>', opts)
-- Sort automatically by...
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)

-- Other:
-- :BarbarEnable - enables barbar (enabled by default)
-- :BarbarDisable - very bad command, should never be used

Options

Note

If you're using Vim Script, just wrap setup like this:

let g:barbar_auto_setup = v:false " disable auto-setup
lua << EOF
  require'barbar'.setup {…}
EOF
vim.g.barbar_auto_setup = false -- disable auto-setup

require'barbar'.setup {
  -- WARN: do not copy everything below into your config!
  --       It is just an example of what configuration options there are.
  --       The defaults are suitable for most people.

  -- Enable/disable animations
  animation = true,

  -- Enable/disable auto-hiding the tab bar when there is a single buffer
  auto_hide = false,

  -- Enable/disable current/total tabpages indicator (top right corner)
  tabpages = true,

  -- Enables/disable clickable tabs
  --  - left-click: go to buffer
  --  - middle-click: delete buffer
  clickable = true,

  -- Excludes buffers from the tabline
  exclude_ft = {'javascript'},
  exclude_name = {'package.json'},

  -- A buffer to this direction will be focused (if it exists) when closing the current buffer.
  -- Valid options are 'left' (the default), 'previous', and 'right'
  focus_on_close = 'left',

  -- Hide inactive buffers and file extensions. Other options are `alternate`, `current`, and `visible`.
  hide = {extensions = true, inactive = true},

  -- Disable highlighting alternate buffers
  highlight_alternate = false,

  -- Disable highlighting file icons in inactive buffers
  highlight_inactive_file_icons = false,

  -- Enable highlighting visible buffers
  highlight_visible = true,

  icons = {
    -- Configure the base icons on the bufferline.
    -- Valid options to display the buffer index and -number are `true`, 'superscript' and 'subscript'
    buffer_index = false,
    buffer_number = false,
    button = '',
    -- Enables / disables diagnostic symbols
    diagnostics = {
      [vim.diagnostic.severity.ERROR] = {enabled = true, icon = 'ff'},
      [vim.diagnostic.severity.WARN] = {enabled = false},
      [vim.diagnostic.severity.INFO] = {enabled = false},
      [vim.diagnostic.severity.HINT] = {enabled = true},
    },
    gitsigns = {
      added = {enabled = true, icon = '+'},
      changed = {enabled = true, icon = '~'},
      deleted = {enabled = true, icon = '-'},
    },
    filetype = {
      -- Sets the icon's highlight group.
      -- If false, will use nvim-web-devicons colors
      custom_colors = false,

      -- Requires `nvim-web-devicons` if `true`
      enabled = true,
    },
    separator = {left = '▎', right = ''},

    -- If true, add an additional separator at the end of the buffer list
    separator_at_end = true,

    -- Configure the icons on the bufferline when modified or pinned.
    -- Supports all the base icon options.
    modified = {button = '●'},
    pinned = {button = '', filename = true},

    -- Use a preconfigured buffer appearance— can be 'default', 'powerline', or 'slanted'
    preset = 'default',

    -- Configure the icons on the bufferline based on the visibility of a buffer.
    -- Supports all the base icon options, plus `modified` and `pinned`.
    alternate = {filetype = {enabled = false}},
    current = {buffer_index = true},
    inactive = {button = '×'},
    visible = {modified = {buffer_number = false}},
  },

  -- If true, new buffers will be inserted at the start/end of the list.
  -- Default is to insert after current buffer.
  insert_at_end = false,
  insert_at_start = false,

  -- Sets the maximum padding width with which to surround each tab
  maximum_padding = 1,

  -- Sets the minimum padding width with which to surround each tab
  minimum_padding = 1,

  -- Sets the maximum buffer name length.
  maximum_length = 30,

  -- Sets the minimum buffer name length.
  minimum_length = 0,

  -- If set, the letters for each buffer in buffer-pick mode will be
  -- assigned based on their name. Otherwise or in case all letters are
  -- already assigned, the behavior is to assign letters in order of
  -- usability (see order below)
  semantic_letters = true,

  -- Set the filetypes which barbar will offset itself for
  sidebar_filetypes = {
    -- Use the default values: {event = 'BufWinLeave', text = nil}
    NvimTree = true,
    -- Or, specify the text used for the offset:
    undotree = {text = 'undotree'},
    -- Or, specify the event which the sidebar executes when leaving:
    ['neo-tree'] = {event = 'BufWipeout'},
    -- Or, specify both
    Outline = {event = 'BufWinLeave', text = 'symbols-outline'},
  },

  -- New buffer letters are assigned in this order. This order is
  -- optimal for the qwerty keyboard layout but might need adjustment
  -- for other layouts.
  letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP',

  -- Sets the name of unnamed buffers. By default format is "[Buffer X]"
  -- where X is the buffer number. But only a static string is accepted here.
  no_name_title = nil,
}

Highlighting

Highlight groups are created in this way: Buffer<STATUS><PART>.

| <STATUS> | Meaning | |:------------|:--------------------------------------------------------| | Alternate | The :h alternate-file. | | Current | The current buffer. | | Inactive | :h hidden-buffers and :h inactive-buffers. | | Visible | :h active-buffers which are not alternate or current. |

| <PART> | Meaning | |:---------------|:-------------------------------------------------------------------------------------| | ADDED | Git status added. | | CHANGED | Git status changed. | | DELETED | Git status deleted. | | ERROR | Diagnostic errors. | | HINT | Diagnostic hints. | | Icon | The filetype icon (when icons.filetype == {custom_colors = true, enabled = true}). | | Index | The buffer's position in the tabline. | | INFO | Diagnostic info. | | Mod | When the buffer is modified. | | Number | The :h bufnr(). | | Sign | The separator between buffers. | | SignRight | The separator between buffers. | | Target | The letter in buffer-pick mode. | | WARN | Diagnostic warnings. |

  • e.g. the current buffer's highlight when modified is BufferCurrentMod

You can also use the doom-one.vim colorscheme that defines those groups and is also very pleasant as you could see in the demos above.

Integrations

Sessions

barbar.nvim can restore the order that your buffers were in, as well as whether a buffer was pinned. To do this, sessionoptions must contain globals, and the User SessionSavePre event must be executed before :mksession.

mini.nvim

Here is a mini.sessions config which can be used:

vim.opt.sessionoptions:append 'globals'
require'mini.sessions'.setup {
  hooks = {
    pre = {
      write = function() vim.api.nvim_exec_autocmds('User', {pattern = 'SessionSavePre'}) end,
    },
  },
}
persistence.nvim

Here is a persistence.nvim config which can be used:

require'persistence'.setup {
  options = {--[[<other options>,]] 'globals'},
  pre_save = function() vim.api.nvim_exec_autocmds('User', {pattern = 'SessionSavePre'}) end,
}
Custom

You can add this snippet to your config to take advantage of our session integration:

vim.opt.sessionoptions:append 'globals'
vim.api.nvim_create_user_command(
  'Mksession',
  function(attr)
    vim.api.nvim_exec_autocmds('User', {pattern = 'SessionSavePre'})

    -- Neovim 0.8+
    vim.cmd.mksession {bang = attr.bang, args = attr.fargs}

    -- Neovim 0.7
    vim.api.nvim_command('mksession ' .. (attr.bang and '!' or '') .. attr.args)
  end,
  {bang = true, complete = 'file', desc = 'Save barbar with :mksession', nargs = '?'}
)

Known Issues

Lightline

Barbar doesn't show up because lightline changes the tabline setting. Add:

let g:lightline={ 'enable': {'statusline': 1, 'tabline': 0} }

Netrw

netrw has a lot of bugs which make it hard to support. It may work partially, but we will not make changes to barbar.nvim to work-around netrw-specific bugs (e.g. #82).

You can use any other file explorer instead.

Sidebars On Startup

The sidebar_filetypes option may not work as expected if your sidebar opens on startup. See nvim-tree/nvim-tree.lua#2130 for details, and romgrk/barbar.nvim#421 for a workaround.

About

Barbar is called barbar because it's a bar, but it's also more than a bar: a "barbar".

It is pronounced like "Jar Jar" in "Jar Jar Binks", but with Bs.

No, barbar has nothing to do with barbarians.

License

  • barbar.nvim: Distributed under the terms of the JSON license.
  • bbye.vim: Distributed under the terms of the GNU Affero license.