Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcchrish/info-window.nvim
See file information in a floating window
https://github.com/mcchrish/info-window.nvim
neovim neovim-plugin
Last synced: 2 months ago
JSON representation
See file information in a floating window
- Host: GitHub
- URL: https://github.com/mcchrish/info-window.nvim
- Owner: mcchrish
- License: mit
- Created: 2020-03-27T03:55:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T09:20:07.000Z (over 4 years ago)
- Last Synced: 2024-07-03T14:59:20.930Z (3 months ago)
- Topics: neovim, neovim-plugin
- Language: Vim script
- Homepage: https://michaelchris.substack.com/p/info-windownvim-replacing-statusline
- Size: 23.4 KB
- Stars: 18
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# info-window.nvim
Open a small floating window containing a few details about the current buffer.
Useful when you just want to quickly see details about a file like ``.Simple custom mapping:
```vim
nnoremap :InfoWindowToggle
```## Install
Any package manager will do.
```vim
Plug 'mcchrish/info-window.nvim'
```## Configuration
By default, the following information is displayed in the information window:
- Buffer name
- Buffer type
- Buffer format
- Number of linesBut you can use `infowindow#create` or `infowindow#toggle` then pass a custom
funcref/lambda that returns a list of lines.```vim
" Extend the default content and add current git branch
" Lines can be plain string or a list where the first element is the label and
" the second element is the content. It will be then automatically formatted.
command! InfoWindowCustomToggle call infowindow#toggle({} , { default_lines -> extend(default_lines, [['branch', fugitive#head()]]) })
```By default, the information window will disappear after 2.5 seconds. You can
change it using `g:infowindow_timeout`. If the timeout is `0`, then it will
not be closed automatically.### Highlighting
You can change the highlighting of the floating window by setting
`InfoWindowFloat`.Default:
```vim
highlight link InfoWindowFloat StatusLine
```
colorscheme yin## Contributing
PR is welcome! This plugin is basic as it is. It does not even support vim
popup. So if anyone wants to add some improvements, go ahead.### Wishlist
- [ ] vim popup
- [ ] borders
- [ ] more file details and customization
- [x] able to add custom text
- [x] customize colors/highlighting
- [ ] reactive: display info about whatever current buffer
- [ ] close window on cursor move