Bufferline (Tab Management Plugin)

Shaik Zahid
2 min readFeb 6, 2023

--

Bufferline is a file group management system. It was developed by Akin. One can move, delete, pin, sort files according to their needs. Bufferline requires a Web-devicons as its dependency inorder to load file icons into Bufferline.

Installation

  1. Create a new file bufferline-config.lua in your lua directory.
  2. Add this code to your plugins.lua file so that the extension gets installed into your configuration.
return {

-- Bufferline
{
'akinsho/bufferline.nvim',
dependencies = 'nvim-tree/nvim-web-devicons'
},

}

3. According to the code, the other plugin nvim-tree/nvim-web-devicons also be added as a dependency to bufferline in our configuration. We don’t need to have any concern about it as it manages itself.

4. Invoke Lazy to check the status of installation of the plugin.

Lazy before installing bufferline.

5. Install bufferline and its dependency using Lazy.

Lazy after installing bufferline.

6. Even though the plugins are installed, they are not loaded for the first time right after getting installed.

Bufferline Configuration

  • Configure bufferline using the following code.
vim.opt.termguicolors = true

require("bufferline").setup{
options = {
hover = {
enabled = true,
delay = 150,
reveal = {'close'}
}
}
}
  • Source bufferline configuration to init.vim
require "keymaps"
require "options"
require "lazy-config"
require "bufferline-config" -- Added this line
  • Reload the configuration to check the difference of bufferline visibility.

Folder Structure

Bufferline configuration in lua directory
  • File named bufferline-config.lua is added to lua directory.

Bufferline Alternatives

Neovim From Scratch

  • If you want a complete installation and configuration of Neovim from Scratch, then you can head over to my NEOVIM SERIES.
  • This series is updated regularly, with updates and inclusion of newer plugins which improves the wholesome IDE experience of Neovim.

--

--