Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crispgm/nvim-tabline
nvim port of tabline.vim with Lua
https://github.com/crispgm/nvim-tabline
neovim neovim-lua neovim-plugin nvim-lua tabline
Last synced: 3 days ago
JSON representation
nvim port of tabline.vim with Lua
- Host: GitHub
- URL: https://github.com/crispgm/nvim-tabline
- Owner: crispgm
- License: mit
- Created: 2021-02-14T06:31:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T03:11:20.000Z (8 months ago)
- Last Synced: 2025-01-19T03:34:49.226Z (7 days ago)
- Topics: neovim, neovim-lua, neovim-plugin, nvim-lua, tabline
- Language: Lua
- Homepage:
- Size: 89.8 KB
- Stars: 79
- Watchers: 5
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - crispgm/nvim-tabline - Neovim port of tabline.vim with Lua. (Bars and Lines / Tabline)
README
# nvim-tabline
A minimal Tabline plugin for Neovim, written in Lua.
It is basically a drop-in replacement for [tabline.vim](https://github.com/mkitt/tabline.vim) but with [a few differences](#Differences).![nvim-tabline-screenshots](screenshots/nvim-tabline.png)
## Installation
With `lazy.nvim`:
```lua
{
'crispgm/nvim-tabline',
dependencies = { 'nvim-tree/nvim-web-devicons' }, -- optional
config = true,
}
```## Configuration
```lua
require('tabline').setup({opts})
```### Defaults
```lua
require('tabline').setup({
show_index = true, -- show tab index
show_modify = true, -- show buffer modification indicator
show_icon = false, -- show file extension icon
fnamemodify = ':t', -- file name modifier string
-- can be a function to modify buffer name
modify_indicator = '[+]', -- modify indicator
no_name = 'No name', -- no name buffer name
brackets = { '[', ']' }, -- file name brackets surrounding
inactive_tab_max_length = 0 -- max length of inactive tab titles, 0 to ignore
})
```### Show Tabline
```lua
" Only if there are at least two tabs (default)
vim.opt.showtabline = 1" Always
vim.opt.showtabline = 2" Never
vim.opt.showtabline = 0
```### Mappings
Vim's tabpage commands are powerful enough, `:help tabpage` for details.
If you need switch between tabs, [here is a great tutorial](https://superuser.com/questions/410982/in-vim-how-can-i-quickly-switch-between-tabs).### Highlights
The highlighting of the tab pages line follows vim settings. See `:help setting-tabline` for details.
### Differences
nvim-tabline is not exactly a Lua translation. There are some differences for configuration:
- Control whether to display tab number (`show_index`) and buffer modification indicator (`show_modify`).
- File extension icon with nvim-dev-icons.
- Customize modify indicator and no name buffer name.
- Close button (`g:tablineclosebutton`) is not supported.