103 lines
4.1 KiB
Plaintext
Executable File
103 lines
4.1 KiB
Plaintext
Executable File
==============================================================================
|
|
------------------------------------------------------------------------------
|
|
*mini.tabline*
|
|
*MiniTabline*
|
|
Minimal and fast tabline showing listed buffers. General idea: show all
|
|
listed buffers in readable way with minimal total width. Also allow showing
|
|
extra information section in case of multiple vim tabpages.
|
|
|
|
Features:
|
|
- Buffers are listed in the order of their identifier (see |bufnr()|).
|
|
- Different highlight groups for "states" of buffer affecting 'buffer tabs'.
|
|
- Buffer names are made unique by extending paths to files or appending
|
|
unique identifier to buffers without name.
|
|
- Current buffer is displayed "optimally centered" (in center of screen
|
|
while maximizing the total number of buffers shown) when there are many
|
|
buffers open.
|
|
- 'Buffer tabs' are clickable if Neovim allows it.
|
|
|
|
What it doesn't do:
|
|
- Custom buffer order is not supported.
|
|
|
|
# Dependencies~
|
|
|
|
Suggested dependencies (provide extra functionality, tabline will work
|
|
without them):
|
|
- Plugin 'kyazdani42/nvim-web-devicons' for filetype icons near the buffer
|
|
name. If missing, no icons will be shown.
|
|
|
|
# Setup~
|
|
|
|
This module needs a setup with `require('mini.tabline').setup({})`
|
|
(replace `{}` with your `config` table). It will create global Lua table
|
|
`MiniTabline` which you can use for scripting or manually (with
|
|
`:lua MiniTabline.*`).
|
|
|
|
See |MiniTabline.config| for `config` structure and default values.
|
|
|
|
You can override runtime config settings locally to buffer inside
|
|
`vim.b.minitabline_config` which should have same structure as
|
|
`MiniTabline.config`. See |mini.nvim-buffer-local-config| for more details.
|
|
|
|
# Highlight groups~
|
|
|
|
* `MiniTablineCurrent` - buffer is current (has cursor in it).
|
|
* `MiniTablineVisible` - buffer is visible (displayed in some window).
|
|
* `MiniTablineHidden` - buffer is hidden (not displayed).
|
|
* `MiniTablineModifiedCurrent` - buffer is modified and current.
|
|
* `MiniTablineModifiedVisible` - buffer is modified and visible.
|
|
* `MiniTablineModifiedHidden` - buffer is modified and hidden.
|
|
* `MiniTablineFill` - unused right space of tabline.
|
|
* `MiniTablineTabpagesection` - section with tabpage information.
|
|
|
|
To change any highlight group, modify it directly with |:highlight|.
|
|
|
|
# Disabling~
|
|
|
|
To disable (show empty tabline), set `g:minitabline_disable` (globally) or
|
|
`b:minitabline_disable` (for a buffer) to `v:true`. Considering high number
|
|
of different scenarios and customization intentions, writing exact rules
|
|
for disabling module's functionality is left to user. See
|
|
|mini.nvim-disabling-recipes| for common recipes. Note: after disabling,
|
|
tabline is not updated right away, but rather after dedicated event (see
|
|
|events| and `MiniTabline` |augroup|).
|
|
|
|
------------------------------------------------------------------------------
|
|
*MiniTabline.setup()*
|
|
`MiniTabline.setup`({config})
|
|
Module setup
|
|
|
|
Parameters~
|
|
{config} `(table)` Module config table. See |MiniTabline.config|.
|
|
|
|
Usage~
|
|
`require('mini.tabline').setup({})` (replace `{}` with your `config` table)
|
|
|
|
------------------------------------------------------------------------------
|
|
*MiniTabline.config*
|
|
`MiniTabline.config`
|
|
Module config
|
|
|
|
Default values:
|
|
>
|
|
MiniTabline.config = {
|
|
-- Whether to show file icons (requires 'kyazdani42/nvim-web-devicons')
|
|
show_icons = true,
|
|
|
|
-- Whether to set Vim's settings for tabline (make it always shown and
|
|
-- allow hidden buffers)
|
|
set_vim_settings = true,
|
|
|
|
-- Where to show tabpage section in case of multiple vim tabpages.
|
|
-- One of 'left', 'right', 'none'.
|
|
tabpage_section = 'left',
|
|
}
|
|
<
|
|
|
|
------------------------------------------------------------------------------
|
|
*MiniTabline.make_tabline_string()*
|
|
`MiniTabline.make_tabline_string`()
|
|
Make string for |tabline|
|
|
|
|
|
|
vim:tw=78:ts=8:noet:ft=help:norl: |