aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlvaro Sevilla <alvaro@chainalysis.com>2021-11-08 00:29:39 +0000
committerAlvaro Sevilla <alvaro@chainalysis.com>2021-11-08 00:29:39 +0000
commit09de29a7b77941441858ce55018ce0353ba6739d (patch)
tree377608916810501089bb5986328792fdb3be7506 /README.md
parentfdc7ad65c9e98238bd3a7e43e34b3568b68e7e6c (diff)
downloadminitab.nvim-09de29a7b77941441858ce55018ce0353ba6739d.tar.xz
minitab.nvim-09de29a7b77941441858ce55018ce0353ba6739d.zip
Improve setup and config
Diffstat (limited to 'README.md')
-rw-r--r--README.md28
1 files changed, 13 insertions, 15 deletions
diff --git a/README.md b/README.md
index 59f3327..2bb146a 100644
--- a/README.md
+++ b/README.md
@@ -14,24 +14,22 @@ use { 'alvarosevilla95/luatab.nvim', requires='kyazdani42/nvim-web-devicons' }
## Usage
Add this to your init.lua:
-
```
-vim.o.tabline = '%!v:lua.require\'luatab\'.tabline()'
+require('luatab').setup{}
```
## 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
-```
+The plugin calls the `helpers.tabline` function to render the line. It uses the other functions defined in `helpers`, such as `cell,separator,devicon`.
+You can pass overrides for any of these functions in `setup`. Please see `lua/luatab/init.lua` for details.
+Example:
+```
+require('luatab').setup{
+ title = function() return '' end,
+ modified = function() return '' end,
+ windowCount = function() return '' end,
+ devicon = function() return '' end,
+ separator = function() return '' end,
+}
+```