https://github.com/simrat39/floatline.nvim
Make 1 global statusline on floating window
https://github.com/simrat39/floatline.nvim
Last synced: 8 months ago
JSON representation
Make 1 global statusline on floating window
- Host: GitHub
- URL: https://github.com/simrat39/floatline.nvim
- Owner: simrat39
- License: mit
- Created: 2021-11-12T03:36:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-12T03:36:28.000Z (over 4 years ago)
- Last Synced: 2025-01-16T06:29:47.856Z (over 1 year ago)
- Language: Lua
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# floatline.nvim
Make 1 global statusline on floating window
It need neovim 0.6 lastest.
It is not a statusline plugin. It copy your statusline to floating window
It support all statusline plugin.
I tested vim-airline,lightline.vim,lualine.nvim
## Installation
``` vim
Plug 'windwp/floatline.nvim'
```
```lua
--- Packer
use 'windwp/floatline.nvim'
require('floatline').setup()
```
## How do I do that?
* create a floating window on bottom
* use luv(vim.loop) to update text and highlight by extmark.
## custom status.
```lua
local count = 1
local txt = '%#Visual# shadman so lazy %##'
require('floatline').setup({
status = function()
local space = string.rep(' ', vim.o.columns - count- 15)
if count < vim.o.columns then
count = count + 2
else
return nil
end
return space .. txt
end,
})
```
you can use it to do something fun or intergation with your plugin statusline
## Issue
- If you open another tabpage and close the last window by command.
`:quit or :bdelete :close` . It will throw error so you need to change to use
command `:Wquit and :Wbdelete.`
Issue https://github.com/neovim/neovim/issues/11440 it will not happen if that issue is fixed
or you can build neovim with PR https://github.com/neovim/neovim/pull/14387
- a floating window can overlap some messages from command line mode
## Warning
floatline.nvim only copy the statusline to floating window.
It can't hide the default statusline on active window because it belong to
statusline plugin.
If you want to looking for a statusline support to hide it.
You can try for better experiences
* [windline.nvim](https://github.com/windwp/windline.nvim)