diff options
author | Alvaro Sevilla <alvaro@chainalysis.com> | 2021-07-05 11:11:23 +0100 |
---|---|---|
committer | Alvaro Sevilla <alvaro@chainalysis.com> | 2021-07-05 11:11:23 +0100 |
commit | 7641a0d3e4339e981eed1980e538eb5f2fe0acd8 (patch) | |
tree | 5c14feadee45182fe64285971042a6636702114a | |
parent | 3f16ab28d6bd9ed7bb23d35118fcaebce4ad2b0f (diff) | |
download | minitab.nvim-7641a0d3e4339e981eed1980e538eb5f2fe0acd8.tar.xz minitab.nvim-7641a0d3e4339e981eed1980e538eb5f2fe0acd8.zip |
Update README
-rw-r--r-- | README.md | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -1 +1,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 +``` + + |