Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/declancm/maximize.nvim
Maximize window splits. A Neovim plugin written in Lua!
https://github.com/declancm/maximize.nvim
lua maximize neovim nvim plugin vim
Last synced: about 3 hours ago
JSON representation
Maximize window splits. A Neovim plugin written in Lua!
- Host: GitHub
- URL: https://github.com/declancm/maximize.nvim
- Owner: declancm
- License: mit
- Created: 2022-05-04T22:39:54.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-18T21:53:33.000Z (3 months ago)
- Last Synced: 2024-08-18T22:49:37.058Z (3 months ago)
- Topics: lua, maximize, neovim, nvim, plugin, vim
- Language: Lua
- Homepage:
- Size: 60.5 KB
- Stars: 48
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# maximize.nvim
Maximize Neovim windows.
## ⨠Features
* Toggle maximizing the current window without any ugly borders.
* Has builtin integration for the following plugins:
* aerial.nvim
* nvim-dap-ui
* nvim-tree.lua## đ ī¸ Requirements
* Neovim >= 0.8.0 (use a tagged version for older Neovim versions)
## đĻ Installation
Install with your favourite plugin manager and run the setup function.
### Packer
```lua
use {
'declancm/maximize.nvim',
config = function() require('maximize').setup() end
}
```### Lazy
```lua
return {
'declancm/maximize.nvim',
config = true
}
```## âšī¸ Usage
### Vim Commands
* Toggle maximizing the current window:
`:Maximize`
### Lua API
* Toggle maximizing the current window:
`require('maximize').toggle()`
* Maximize the current window:
`require('maximize').maximize()`
* Restore windows:
`require('maximize').restore()`
## âī¸ Configuration
A settings table can be passed into the setup function for custom options.
### Default Options
```lua
{
plugins = {
aerial = { enable = true }, -- enable aerial.nvim integration
dapui = { enable = true }, -- enable nvim-dap-ui integration
tree = { enable = true }, -- enable nvim-tree.lua integration
}
}
```## đ User Events
The following user events are triggered:
* **WindowMaximizeStart**: before maximizing
* **WindowRestoreEnd**: after restoring## đĨ statusline & winbar
Use the variable `vim.t.maximized` to check whether the tab has a maximized window.
### Lualine
```lua
local function maximize_status()
return vim.t.maximized and ' ī ' or ''
endrequire('lualine').setup {
sections = {
lualine_c = { maximize_status }
}
}
```### winbar
```lua
-- ~/.config/nvim/lua/winbar.lua
local M = {}M.maximize_status = function()
return vim.t.maximized and ' ī ' or ''
endreturn M
-- ~/.config/nvim/init.lua
vim.o.winbar = "%{%v:lua.require('winbar').maximize_status()%}"
```