Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mnjm/topline.nvim
Simple and minimal tabline as a replacement to inbuilt one with icon and mouse support
https://github.com/mnjm/topline.nvim
nvim nvim-lua nvim-plugin
Last synced: about 1 month ago
JSON representation
Simple and minimal tabline as a replacement to inbuilt one with icon and mouse support
- Host: GitHub
- URL: https://github.com/mnjm/topline.nvim
- Owner: mnjm
- License: mit
- Created: 2024-03-31T12:33:37.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-28T10:39:34.000Z (8 months ago)
- Last Synced: 2024-04-28T11:33:57.604Z (8 months ago)
- Topics: nvim, nvim-lua, nvim-plugin
- Language: Lua
- Homepage:
- Size: 26.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [TopLine.nvim](https://github.com/mnjm/topline.nvim)
**A tabline plugin as a replacement to inbuilt one with icon and mouse support**
![Demo Gi](https://github.com/mnjm/github-media-repo/blob/main/topline.nvim/demo.gif?raw=true)
**My other plugins**
- [BottomLine.nvim](https://github.com/mnjm/bottomline.nvim) - Statusline plugin
- [WinLine.nvim](https://github.com/mnjm/winline.nvim) - WinLine plugin***
## Installation
### vim-plug
```vim
Plug 'mnjm/topline.nvim'
" Optional dependency for icons
Plug 'nvim-tree/nvim-web-devicons'
```
### packer.nvim
```lua
use {
'mnjm/topline.nvim',
-- optional dependency for icons
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
}
```
### lazy.nvim
```lua
{
'mnjm/topline.nvim'
dependencies = { 'nvim-tree/nvim-web-devicons' }
}
```***
## Setup
To start topline, add below line in your neovim config
```lua
require("topline").setup()
```
### Customization
You can pass custom config to override default configs to setup call, for ex
```lua
require('topline').setup({
enable = true,
-- seperator = { pre = '', post = '' },
-- seperator = { pre = '', post = '' },
seperator = { pre = '', post = '' },
close_icon = " ",
highlights = {
TopLineClose = { fg = "#d70000", bg = "#000000" },
},
})
```
Available default configuration options
```lua
require('topline').setup({
enable = true,
seperator = { pre = '', post = '' },
enable_icons = true,
max_fname_len = 25, -- max file name len
close_icon = "[x]",
highlights = { -- highlights
TopLine = { link = 'TabLine' }, -- tab title
TopLineSel = { link = 'TabLineSel' }, -- tab title [Focused]
TopLineFill = { link = 'TabLineFill' }, -- filler
TopLineClose = { link = 'TabLineSel' }, -- close button
},
})
```
You can force nvim to show tabline always by**In lua**
```lua
vim.o.showtabline = 2
```
**In vim**
```vim
set showtabline=2
```
***
![Demo Gi](https://github.com/mnjm/github-media-repo/blob/main/topline.nvim/demo1.gif?raw=true)
![Demo SS](https://github.com/mnjm/github-media-repo/blob/main/topline.nvim/ss1.png?raw=true)
![Demo SS](https://github.com/mnjm/github-media-repo/blob/main/topline.nvim/ss2.png?raw=true)
***
License MIT