aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 087577e314af46d6ad09ab057236b74c19bf6108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# luatab.nvim

## Usage
Add this to your init.lua:

```
Tabline = require'tabline'.tabline
vim.cmd[[ set tabline=%!luaeval('Tabline()') ]]
```

Note: `require'tabline'.tabline` must be assigned to a global variable for it to be picked up by `luaeval`

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
```