Neovim plugin to globally define border style for all floating windows (see :h api-floatwin
).
Warning
This project is still a work in progress and not considered stable
borderline-demo.mov
Configuring floating window border styles is a per window configuration (see :h nvim_open_win()
). Depending on plugin usage,
window options to configure borders may or may not be exposed. In addition, there are alternate ways of rendering a border depending
on the underlying implementation. Alternative methods of providing a border include:
- Drawing the border characters directly in the buffer
- Creating a separate floating window positioned behind the primary window and adding the border to the backmost window.
- Creating a separate floating window positioned behind the primary window and drawing the border characters directly to the backmost window.
Handling all of these scenarios can be difficult and time consuming. borderline.nvim is a solution to provide an easy to configure and consistent border to all floating windows.
Using lazy.nvim
{
'mikesmithgh/borderline.nvim',
enabled = true,
lazy = true,
event = 'VeryLazy',
config = function()
require('borderline').setup({
-- ...
})
end,
}
Using Neovim's built-in package support pack
The following commands can be used to install borderline.nvim via pack. This is allows you to test
the plugin independently of your main Neovim configuration by changing the BORDERLINE_NVIM
variable.
BORDERLINE_NVIM='nvim' # change this if you would like to test independently of your main Neovim configuration, e.g., borderline-nvim
config_dir="$(NVIM_APPNAME="$BORDERLINE_NVIM" nvim --headless +"=vim.fn.stdpath('config')" +quit 2>&1)"
share_dir="$(NVIM_APPNAME="$BORDERLINE_NVIM" nvim --headless +"=vim.fn.stdpath('data')" +quit 2>&1)"
mkdir -p "$share_dir/site/pack/mikesmithgh/start/"
cd "$share_dir/site/pack/mikesmithgh/start"
git clone git@github.com:mikesmithgh/borderline.nvim.git
NVIM_APPNAME="$BORDERLINE_NVIM" nvim -u NONE +"helptags borderline.nvim/doc" +quit
echo "require('borderline').setup()" >> "$config_dir/init.lua"
NVIM_APPNAME="$BORDERLINE_NVIM" nvim
Command | API | Description |
---|---|---|
:Borderline {bordername} |
require('borderline.api').borderline(string|table|nil) |
|
:BorderlineNext |
n/a | |
:BorderlinePrevious |
n/a | |
:BorderlineStartNextTimer |
n/a | |
:BorderlineStopNextTimer |
n/a | |
:BorderlineRegister {name} |
require('borderline.api').register(string|nil) |
|
:BorderlineDeregister {name} |
require('borderline.api').deregister(string|nil) |
|
:BorderlineInfo |
require('borderline.api').info() |
|
:BorderlineDev |
n/a |
- nui.vnim
- plenary.vnim
- fzf-lua
- 🐿️ gruvsquirrel.nvim Neovim colorscheme written in Lua inspired by gruvbox