aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
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,
+}
+```