bundle/nui.nvim/lua/nui/split/README.md
Split is can be used to split your current window or editor.
local Split = require("nui.split")
local split = Split({
relative = "editor",
position = "bottom",
size = "20%",
})
You can manipulate the assocciated buffer and window using the
split.bufnr and split.winid properties.
ns_idType: number or string
Namespace id (number) or name (string).
relativeType: string or table
This option affects how size is calculated.
Examples
Split current editor screen:
relative = "editor"
Split current window (default):
relative = "win"
Split window with specific id:
relative = {
type = "win",
winid = 42,
}
positionposition can be one of: "top", "right", "bottom" or "left".
sizesize can be number or percentage string.
For percentage string, size is calculated according to the option relative.
enterType: boolean
If false, the split is not entered immediately after mount.
Examples
enter = false
buf_optionsTable containing buffer options to set for this split.
win_optionsTable containing window options to set for this split.
Methods from nui.popup are also available for nui.split.
You can find additional documentation/examples/guides/tips-n-tricks in nui.split wiki page.