alvarosevilla95/luatab.nvim

github github
tabline plugin
star 58
stars
alert-circle 4
open issues
users 1
subscribers
git-branch 6
forks
CREATED

2021-07-05

UPDATED

18 days ago

packer

require('packer').startup(function()
  use 'alvarosevilla95/luatab.nvim'
end)

paq

require "paq" { 
  'alvarosevilla95/luatab.nvim'
}

luatab.nvim

luatab

Features

  • Just a lua rewrite of the tabline render function
  • No weird mixing buffers and tabs stuff

Install

Using packer.nvim:

use { 'alvarosevilla95/luatab.nvim', requires='kyazdani42/nvim-web-devicons' }

Usage

Add this to your init.lua:

vim.o.tabline = '%!v:lua.require\'luatab\'.tabline()'

Configuration

You can also define your own tabline function using the provided functions for help. The default tabline is equivalent to:

local formatTab = require'luatab'.formatTab
Tabline = function()
    local i = 1
    local line = ''
    while i <= vim.fn.tabpagenr('$') do
        line = line .. formatTab(i)
        i = i + 1
    end
    return  line .. '%T%#TabLineFill#%='
end