Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RRethy/nvim-hotline
Minimal Lua wrappers for 'statusline' and 'tabline'
https://github.com/RRethy/nvim-hotline
Last synced: about 2 months ago
JSON representation
Minimal Lua wrappers for 'statusline' and 'tabline'
- Host: GitHub
- URL: https://github.com/RRethy/nvim-hotline
- Owner: RRethy
- Created: 2021-03-25T05:35:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-22T16:43:45.000Z (over 2 years ago)
- Last Synced: 2024-06-25T22:42:44.405Z (3 months ago)
- Language: Lua
- Size: 1.95 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nvim-hotline
Minimal Lua wrappers for setting your `'statusline'` and `'tabline'`.
This will format the table/string/function to be passed to either option via standard mechanisms (`vim.o.statusline`, `vim.o.tabline`, etc.).
## Usage
```lua
local hotline = require('hotline')--- hotline.format() takes X where X is a:
---
--- string
--- function
--- table that contains one or more X
vim.o.statusline = hotline.format {
'provide a string',
'the string can have things like %f %l %c', -- see :h 'statusline'
function()
return 'provide a function'
end,
{
'provide another table',
function()
return 'some more text'
end
}
}--- The same format is used for tabline so this works too:
vim.o.tabline = hotline.format {
'same format',
function() return 'can be used' end,
}--- You can use this to set the window local statusline too
vim.wo.statusline = hotline.format {'local to window'}
```