diff options
author | Tim Keller <tjkeller.xyz> | 2024-11-28 11:53:51 -0600 |
---|---|---|
committer | Tim Keller <tjkeller.xyz> | 2024-11-28 11:53:51 -0600 |
commit | 53921c4f2b2ef868b1bed70bc11ab330b0ad4a47 (patch) | |
tree | d292afac7bb9d32f22838f6d9cb136fc5d9e10b4 /README.md | |
parent | 4e6ad07b4bd217e9fb44d99225b3467d5c5f33f1 (diff) | |
download | minitab.nvim-53921c4f2b2ef868b1bed70bc11ab330b0ad4a47.tar.xz minitab.nvim-53921c4f2b2ef868b1bed70bc11ab330b0ad4a47.zip |
readme updated and minitab fixed
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 46 |
1 files changed, 32 insertions, 14 deletions
@@ -1,30 +1,48 @@ # minitab.nvim -Fork of +Minitab is a minimal lua reimplementaion of the tabline render function with +some improvements. +It consists of only ~80 lines of code. + +Minitab started as a fork of [`alvarosevilla95/luatab.nvim`](https://github.com/alvarosevilla95/luatab.nvim) ## Features -* Just a lua rewrite of the tabline render function -* No weird mixing buffers and tabs stuff -* Size/position of tabs doesn't change +* Text only rendering +* Size/position of tabs doesn't change while switching between them +* File paths are not shown +* Smart handling of module files (e.g. `init.lua` => `module/init.lua`) + +## Example bar +` +2 README.md | minitab/init.lua | + [No Name] | ~/docs/src/ | newrw | zsh | TelescopePrompt ` + +The above text demonstrates or less what you can expect from this plugin's +default tabline rendering. ## Install -Using [`lazy.nvim`](https://github.com/folke/lazy.nvim) +Using a [`lazy.nvim`](https://github.com/folke/lazy.nvim) module ```lua return { url = 'https://git.tjkeller.xyz/minitab.nvim', config = true } ``` ## Configuration - -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/minitab/init.lua` for details. +The plugin calls the `helpers.tabline` function to render the line. +It uses the other functions and constants defined in `helpers`. +You can pass overrides for any of these in `setup`. +Please see `lua/minitab.lua` for details. Example: -``` -require('minitab').setup{ - title = function() return '' end, - modified = function() return '' end, - windowCount = function() return '' end, - separator = function() return '' end, +```lua +require("minitab").setup{ + modifiedC = "*", + separator = function(index) + local sepC = "><" + if index == 0 then + sepC = "<" + elseif index == vim.fn.tabpagenr('$') + sepC = ">" + end + return '%#TabLine#' .. sepC + end, } ``` |