fontsize
is a simple lua plugin for neovim that adds Commands to change the GUI font size on-the-fly.
With packer
:
use 'Sup3Legacy/fontsize.nvim'
With Plug
:
Plug 'Sup3Legacy/fontsize.nvim'
require('fontsize').init(
{
-- Required argument
font = "Fira Code, Nerd Font",
-- Optional arguments
min = 6,
default = 10,
max = 24,
step = 1,
}
)
The defaults are the following:
local defaults = {
min = 6,
default = 8,
max = 20,
step = 1
}
When properly initialized, fontsize
defines a few commands:
FontIncrease
: to increase the GUI font size bystep
FontDecrease
: to decrease it bystep
FontReset
: to reset the font size to the default value
require('fontsize').indicator
is a function that outputs a string representing the current fontsize. It can be used as a field in e.g. lualine
.