size matters.nvim
1.0.0
☕ Soydev plugin series.
Lua plugin that adds dynamic font scaling to modern neovim GUI clients like neovide or goneovim.
| Keymaps | Commands | |
|---|---|---|
| Increase font size | Ctrl++ / Ctrl+ScrollUp | FontSizeUp <num> |
| Decrease font size | Ctrl+- / Ctrl+ScrollDown | FontSizeDown <num> |
| Reset font to default | Ctrl+Alt+= | FontReset |
A simple way to install the plugin is via a plugin manager. E.g., packer.nvim
use "tenxsoydev/size-matters.nvim"Then just load it like most other plugins. Additionally, you can wrap it in a condition to only be loaded when using a GUI client. E.g.,
if vim.g.neovide or vim.g.goneovim or vim.g.nvui or vim.g.gnvim then
require("size-matters")
endIf you want to change some configurations, those are the defaults
require("size-matters").setup({
default_mappings = true,
-- font resize step size
step_size = 1,
notifications = {
enable = true,
-- ms how long a notification should be displayed (only applies if notify is used)
timeout = 150,
-- the notifications position may be affected by the time it takes for the client to re-render
-- to address this, it can be displayed with a delay.
delay = 300,
}
-- the font loaded when using the reset cmd / shortcut
reset_font = vim.api.nvim_get_option("guifont"),
})nvim >= v0.7 - as APIs introduced with v0.7 are used.